On my server side, I throw a RemoteException() when an exception occurs
for som reason, like this:
throw new RemoteException( "This is an exception", myException );
On the client side, I try to catch the exception like this:
try {
} catch( RemoteException ex ) {
if ( ex.getCause() instanceOf myException ) {
throw (myException)ex.getCause();
} ...
}
But when I check the return value of getCause() it is null. Apparently,
my "cause" was not serialized (although I do see the message). Am I
doing anything wrong?
Basically, what I want to do is that my application receives the same
exception whether it sits locally or goes through the web services.
Thanks,
--
John L. Fjellstad, Software Engineer