For example:
note: Object A include one property "msg".
Server code:
try {
Integer x = new Integer("aaa"); // NumberFormatException happened here
} catch (Exception e) {
// I want the info "hello java" to be sent to client
testInfo.setMsg("hello java");
throw e;
}
I start one request by below code:
try {
A testInfo = new A();
...
client.invoke(testInfo);
} catch (Exception e) {
// when I print testInfo.getMsg(), nothing printed ( I wish "hello java" is printed here)
System.out.println( testInfo.getMsg() );
}
Any one give me some help? Thank you!!!