THRIFT-1805 Thrift should not swallow ALL exceptions
authorRoger Meier <roger@apache.org>
Wed, 23 Jan 2013 19:18:58 +0000 (20:18 +0100)
committerRoger Meier <roger@apache.org>
Wed, 23 Jan 2013 19:18:58 +0000 (20:18 +0100)
Patch: Diwaker Gupta

lib/java/src/org/apache/thrift/ProcessFunction.java

index 2ba3527..19c8f14 100644 (file)
@@ -37,8 +37,8 @@ public abstract class ProcessFunction<I, T extends TBase> {
 
     try {
       result = getResult(iface, args);
-    } catch(Throwable th) {
-      LOGGER.error("Internal error processing " + getMethodName(), th);
+    } catch(TException tex) {
+      LOGGER.error("Internal error processing " + getMethodName(), tex);
       TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, 
         "Internal error processing " + getMethodName());
       oprot.writeMessageBegin(new TMessage(getMethodName(), TMessageType.EXCEPTION, seqid));