From 5a2a588c8639f8c8559fb11b6a5e33f6843308ce Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 20 May 2009 06:16:23 +0000 Subject: Removing obsolete FIXME tags, as exceptions are handled ok on wireFormat interceptor already git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@776575 13f79535-47bb-0310-9956-ffa450edef68 --- .../jsonrpc/provider/JSONRPCWireFormatInterceptor.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'branches/sca-java-1.x') diff --git a/branches/sca-java-1.x/modules/binding-http-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java b/branches/sca-java-1.x/modules/binding-http-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java index c93aa38613..85f5f1e27f 100644 --- a/branches/sca-java-1.x/modules/binding-http-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java +++ b/branches/sca-java-1.x/modules/binding-http-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java @@ -84,16 +84,6 @@ public class JSONRPCWireFormatInterceptor implements Interceptor { msg.setBody(args); responseMessage = runtimeWire.getInvocationChain(msg.getOperation()).getHeadInvoker().invoke(msg); } catch (RuntimeException re) { - //FIXME Exceptions are not handled correctly here - // They should be reported to the client JavaScript as proper - // JavaScript exceptions. - - //throw new RuntimeException("Error invoking service :" + re.getMessage(), re); - - //FIXME should create a fault message and stuff the JSON Result in the body of the message - //JSONRPCResult errorResult = new JSONRPCResult(JSONRPCResult.CODE_REMOTE_EXCEPTION, id, re); - //return errorResult.toString().getBytes("UTF-8"); - Throwable exception = new RuntimeException("Error invoking service :" + re.getMessage(), re); return createJSONFaultMessage(re); } @@ -114,11 +104,8 @@ public class JSONRPCWireFormatInterceptor implements Interceptor { } } else { //exception thrown while executing the invocation - //FIXME should create a fault message and stuff the JSON Result in the body of the message Throwable exception = (Throwable)responseMessage.getBody(); - return createJSONFaultMessage( exception); - //JSONRPCResult errorResult = new JSONRPCResult(JSONRPCResult.CODE_REMOTE_EXCEPTION, id, exception ); - //return errorResult.toString().getBytes("UTF-8"); + return createJSONFaultMessage(exception); } } -- cgit v1.2.3