diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-25 05:03:20 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-25 05:03:20 +0000 |
commit | 2cbe992b4f8680a9bcbf2af5280154056c95ead9 (patch) | |
tree | 4d40f8f69a3beca814d3e0fd7935d9db446a7038 /sca-java-2.x/trunk/modules | |
parent | 4771f49b9ff2c082c8e3b721b42be441642d8cd0 (diff) |
Exception handling in TransactionInterceptor
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@916126 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r-- | sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java | 14 |
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; } |