}
}
if (!ok) {
// rmi.3E=Remote method threw unexpected exception
resEx = new UnexpectedException(Messages.getString("rmi.3E"), resEx); //$NON-NLS-1$
}
}
// Add our stacktrace to the stacktrace of exception received
StackTraceElement[] origST = resEx.getStackTrace();
StackTraceElement[] curST = (new Exception()).getStackTrace();
StackTraceElement[] resST =
new StackTraceElement[origST.length + curST.length];
System.arraycopy(origST, 0, resST, 0, origST.length);
System.arraycopy(curST, 0, resST, origST.length, curST.length);
resEx.setStackTrace(resST);
// logs exception from server
if (UnicastRef.clientCallsLog.isLoggable(RMILog.BRIEF)) {
UnicastRef.clientCallsLog.log(RMILog.BRIEF,
Messages.getString("rmi.log.92", conn), resEx); //$NON-NLS-1$
}
throw resEx;
} else {
// rmi.3F=Not Exception type thrown: {0}
throw new UnexpectedException(Messages.getString("rmi.3F", obj)); //$NON-NLS-1$
}
}