} catch (DataFormatException e) {
throw new PyroException("invalid compressed data: ", e);
}
}
if ((resultmsg.flags & MessageFactory.FLAGS_EXCEPTION) != 0) {
Unpickler unpickler=new Unpickler();
Throwable rx = (Throwable) unpickler.loads(resultmsg.data);
unpickler.close();
if (rx instanceof PyroException) {
throw (PyroException) rx;
} else {
PyroException px = new PyroException("remote exception occurred", rx);
try {
Field remotetbField = rx.getClass().getDeclaredField("_pyroTraceback");
String remotetb = (String) remotetbField.get(rx);
px._pyroTraceback = remotetb;
} catch (Exception e) {
// exception didn't provide a pyro remote traceback
}
throw px;
}
}
Unpickler unpickler=new Unpickler();
Object result=unpickler.loads(resultmsg.data);
unpickler.close();
return result;
}