Open GoogleCodeExporter opened 9 years ago
For me its not enough
The line "result = RPC.encodeResponseForSuccess(method, callResult);" must be
moved
from after the catch to after "result = RPC.encodeResponseForSuccess(method,
callResult);". If the encoding is done after the catch, the result is
overridden in
case of a exception is thrown.
Modified code:
// now make the call
Object callResult = null;
try {
callResult = method.invoke(actionInvocation.getAction(),
rpcRequest.getParameters());
// package up response for GWT
result = RPC.encodeResponseForSuccess(method, callResult); // Moved to here
} catch (IllegalAccessException iie) {
// This may need to change this to package up up the cause
// instead of the thrown exception, not sure if the
// chaining will translate
result = RPC.encodeResponseForFailure(method, iie,
rpcRequest.getSerializationPolicy());
} catch (InvocationTargetException ite) {
// This may need to change this to package up up the cause
// instead of the thrown exception, not sure if the
// chaining will translate
result = RPC.encodeResponseForFailure(method, ite.getTargetException(),
rpcRequest.getSerializationPolicy());
}
// return our response
return result;
Best regards
Beat Keller
http://crane.dnsalias.com/
Original comment by beat.kel...@btxtech.com
on 16 Jan 2008 at 2:54
I just patched this and other problems in our usage. Is there no one available
to
accept patches? or is there a more actively maintained fork somewhere???
Original comment by karajdaar@gmail.com
on 2 Feb 2009 at 5:46
Original issue reported on code.google.com by
eho...@gmail.com
on 24 Oct 2007 at 10:39