summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/assembly-xml/src
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2009-05-03 07:10:36 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2009-05-03 07:10:36 +0000
commit12b7d7d4dbcfe8cd751faa5c29b00b9282059da6 (patch)
treed84ee6b484f97bbe333e6afaa0701e19d0c68d39 /java/sca/modules/assembly-xml/src
parent1f71cd3fb1e29fb62c448dd61071fbda5248190d (diff)
Improve error reporting when exceptions occur during composite document processing - tag all exceptions with the name of the composite.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@771032 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/assembly-xml/src')
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java
index 10e36bea48..db5a52a505 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java
@@ -147,8 +147,14 @@ public class CompositeDocumentProcessor extends BaseAssemblyProcessor implements
}
public void resolve(Composite composite, ModelResolver resolver) throws ContributionResolveException {
- if (composite != null)
- extensionProcessor.resolve(composite, resolver);
+ try {
+ if (composite != null)
+ extensionProcessor.resolve(composite, resolver);
+ } catch (Throwable e ) {
+ // Add information about which composite was being processed when the exception occurred
+ String newMessage = "Processing composite " + composite.getName() + ": " + e.getMessage();
+ throw new ContributionResolveException( newMessage, e );
+ } // end try
}
public String getArtifactType() {