diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-23 13:06:07 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-23 13:06:07 +0000 |
commit | ff2090ae5396134fb0c44b90c6599ab15baf8ff8 (patch) | |
tree | 8129f2b02f4523b13d5d31574486e397adf3b447 /sca-java-2.x/trunk | |
parent | 88d884f45064bf348a986ab456b59d738c145deb (diff) |
Throw systematic errors as ServiceRuntimeExceptions
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1052256 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r-- | sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java index 62593ba895..34c00dbb94 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java @@ -178,10 +178,7 @@ public class RuntimeInvoker implements Invoker, InvokerAsyncRequest { // temporary fix to swallow the dummy exception that's // thrown back to get past the response chain processing. if (!(ex instanceof AsyncResponseException)){ - // send the exception in through the - // async response processing path - msg.setFaultBody(ex); - invokeAsyncResponse(msg); + throw new ServiceRuntimeException(ex); } } } finally { @@ -200,11 +197,15 @@ public class RuntimeInvoker implements Invoker, InvokerAsyncRequest { public void invokeAsyncResponse(Message msg) { InvocationChain chain = invocable.getInvocationChain(msg.getOperation()); Invoker tailInvoker = chain.getTailInvoker(); - ((InvokerAsyncResponse)tailInvoker).invokeAsyncResponse(msg); + try { + ((InvokerAsyncResponse)tailInvoker).invokeAsyncResponse(msg); + } catch (Throwable ex) { + throw new ServiceRuntimeException(ex); + } } // end method invokeAsyncResponse - @Override - public void invokeAsyncRequest(Message msg) throws Throwable { - invokeAsync(msg); - } // end method invokeAsyncRequest + @Override + public void invokeAsyncRequest(Message msg) throws Throwable { + invokeAsync(msg); + } // end method invokeAsyncRequest } |