}
OtpErlangObject result = ((OtpErlangTuple) rpcResponse)
.elementAt(1);
if (MessageHelper.isfunctionUndefMessage(result)) {
// TODO: externalize message?
Exception e = new ErlangException("No '" + binding.getModule()
+ ":" + msg.getOperation().getName()
+ "' operation defined on remote '" + binding.getNode()
+ "' node.");
reportProblem(msg, e);
msg.setBody(null);
} else if (msg.getOperation().getOutputType() != null) {
jmethod.getAnnotations();
msg.setBody(TypeHelpersProxy.toJava(result, msg.getOperation()
.getOutputType().getPhysical(), jmethod
.getAnnotations()));
}
} catch (OtpAuthException e) {
// TODO: externalize message?
ErlangException ee = new ErlangException(
"Problem while authenticating client - check your cookie",
e);
msg.setBody(null);
reportProblem(msg, ee);
} catch (InterruptedException e) {
// TODO: externalize message?
ErlangException ee = new ErlangException(
"Timeout while receiving RPC reply", e);
msg.setBody(null);
reportProblem(msg, ee);
} catch (Exception e) {
reportProblem(msg, e);