From: Roger Meier Date: Wed, 23 Jan 2013 19:18:58 +0000 (+0100) Subject: THRIFT-1805 Thrift should not swallow ALL exceptions X-Git-Tag: 0.9.1~193^2 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=7b96b2249a43ae75b48e0aba7e8beffc67b32d93;p=common%2Fthrift.git THRIFT-1805 Thrift should not swallow ALL exceptions Patch: Diwaker Gupta --- diff --git a/lib/java/src/org/apache/thrift/ProcessFunction.java b/lib/java/src/org/apache/thrift/ProcessFunction.java index 2ba35279..19c8f145 100644 --- a/lib/java/src/org/apache/thrift/ProcessFunction.java +++ b/lib/java/src/org/apache/thrift/ProcessFunction.java @@ -37,8 +37,8 @@ public abstract class ProcessFunction { 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));