diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-02-07 12:27:38 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-02-07 12:27:38 +0000 |
commit | 67f145402763e4160b1211a129f7eb0650c0d967 (patch) | |
tree | bce24f163245918119164f5db1d9aa8e9b2290da /sca-java-2.x/trunk/modules/binding-jms/src | |
parent | b8cd8af0c6a712e13334f74e1eeed9cd9bca7c7b (diff) |
TUSCANY-4001: Update JMS Binding to use the QName of the element in UnexpectedElement error messages
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1241442 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jms/src')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java index 40a1c27980..2c8b81974b 100644 --- a/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java +++ b/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java @@ -353,7 +353,8 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St } } else { - error(monitor, "UnexpectedElement", reader, extension.toString()); + String t = (extension instanceof Extension) ? ((Extension)extension).getQName().toString() : extension.toString(); + error(monitor, "UnexpectedElement", reader, t); } } } @@ -370,8 +371,9 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St if (x.equals(JMSBindingConstants.BINDING_JMS_QNAME)) { endFound = true; } else { - error(monitor, "UnexpectedElement: expected " + JMSBindingConstants.BINDING_JMS_QNAME + ", found " + x.toString(), - reader, x.toString()); + String t = (x instanceof Extension) ? ((Extension)x).getQName().toString() : x.toString(); + error(monitor, "UnexpectedElement: expected " + JMSBindingConstants.BINDING_JMS_QNAME + ", found " + t, + reader, t); } } } @@ -697,7 +699,8 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St error(context.getMonitor(), "ResponseWireformatAlreadyDefined", reader, extension.toString()); } } else { - error(context.getMonitor(), "UnexpectedElement", reader, extension.toString()); + String t = (extension instanceof Extension) ? ((Extension)extension).getQName().toString() : extension.toString(); + error(context.getMonitor(), "UnexpectedElement", reader, t); } } reader.next(); |