From b64c845258c3524606bef5a5c1071472581134c0 Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 17 Nov 2005 16:47:15 +0000 Subject: [PATCH] * Adapt to strange behaviour of Apache XML-RPC 2.0 to return exceptions instead of throwing them. Fixes bug 446. --- src/helma/scripting/rhino/extensions/XmlRpcObject.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helma/scripting/rhino/extensions/XmlRpcObject.java b/src/helma/scripting/rhino/extensions/XmlRpcObject.java index 4ceb2e1c..1aab5d12 100644 --- a/src/helma/scripting/rhino/extensions/XmlRpcObject.java +++ b/src/helma/scripting/rhino/extensions/XmlRpcObject.java @@ -124,7 +124,11 @@ public class XmlRpcObject extends BaseFunction { } Object result = client.execute(method, v); - + // FIXME: Apache XML-RPC 2.0 seems to return Exceptions instead of + // throwing them. + if (result instanceof Exception) { + throw (Exception) result; + } retval.put("result", retval, c.processXmlRpcArgument(result)); } catch (Exception x) {