2004-09-24 Ilya Perminov <iperminov@logicalsoft.com>
* gnu/java/rmi/server/UnicastServer.java (incomingMessageCall): Added code to handle Errors. * gnu/java/rmi/server/UnicastServerRef.java (incomingMessageCall): Added code to handle Errors. From-SVN: r88030
This commit is contained in:
committed by
Michael Koch
parent
4a198dea28
commit
c7c671b942
@@ -284,7 +284,16 @@ public Object incomingMessageCall(UnicastConnection conn, int method, long hash)
|
||||
try{
|
||||
ret = meth.invoke(myself, args);
|
||||
}catch(InvocationTargetException e){
|
||||
throw (Exception)(e.getTargetException());
|
||||
Throwable cause = e.getTargetException();
|
||||
if (cause instanceof Exception) {
|
||||
throw (Exception)cause;
|
||||
}
|
||||
else if (cause instanceof Error) {
|
||||
throw (Error)cause;
|
||||
}
|
||||
else {
|
||||
throw new Error("The remote method threw a java.lang.Throwable that is neither java.lang.Exception nor java.lang.Error.", e);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user