summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java b/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java
index 9488475b12..0d72fa5520 100644
--- a/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java
+++ b/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java
@@ -104,9 +104,17 @@ public class TransactionInterceptor implements PhasedInterceptor {
} else {
result = helper.handlesInbound(interactionIntent, implementationIntent, invocation);
}
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+
+ } catch (Throwable e) {
+ if (e instanceof Error) {
+ throw (Error)e;
+ } else if (e instanceof RuntimeException) {
+ throw (RuntimeException)e;
+ } else {
+ result = msg;
+ msg.setFaultBody(e);
+ }
+
}
return result;
}