diff --git a/src/helma/xmlrpc/XmlRpcServer.java b/src/helma/xmlrpc/XmlRpcServer.java index b857eb1e..0d347ee1 100644 --- a/src/helma/xmlrpc/XmlRpcServer.java +++ b/src/helma/xmlrpc/XmlRpcServer.java @@ -275,7 +275,12 @@ class Invoker implements XmlRpcHandler { catch (InvocationTargetException it_e) { if (XmlRpc.debug) it_e.getTargetException ().printStackTrace (); - throw new Exception (it_e.getTargetException ().toString ()); + // check whether the thrown exception is XmlRpcException + Throwable t=it_e.getTargetException(); + if ( t instanceof XmlRpcException) + throw (XmlRpcException) t; + // It is some other exception + throw new Exception (t.toString ()); } return returnValue;