if((result != null) && (result instanceof Throwable)) {
if(result instanceof IMTPException) {
throw (IMTPException)result;
}
else {
throw new IMTPException("An undeclared exception was thrown", (Throwable)result);
}
}
}
catch(ServiceException se) {
// Should never happen
throw new IMTPException("Unable to access remote node stub", se);
}
}