From: Bryan Duxbury Date: Wed, 2 Nov 2011 22:40:01 +0000 (+0000) Subject: THRIFT-1419. java: AbstractNonBlockingServer does not catch errors when invoking... X-Git-Tag: 0.8.0~34 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=e7bdf70daba05e2fa704a3562eb924573342777b;p=common%2Fthrift.git THRIFT-1419. java: AbstractNonBlockingServer does not catch errors when invoking the processor This patch changes the invoke() method to catch Throwables instead of just Exceptions. Patch: Thomas Kielbus" git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1196848 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/java/src/org/apache/thrift/server/AbstractNonblockingServer.java b/lib/java/src/org/apache/thrift/server/AbstractNonblockingServer.java index 2bd74fa8..65d8738a 100644 --- a/lib/java/src/org/apache/thrift/server/AbstractNonblockingServer.java +++ b/lib/java/src/org/apache/thrift/server/AbstractNonblockingServer.java @@ -479,10 +479,10 @@ public abstract class AbstractNonblockingServer extends TServer { return; } catch (TException te) { LOGGER.warn("Exception while invoking!", te); - } catch (Exception e) { - LOGGER.error("Unexpected exception while invoking!", e); + } catch (Throwable t) { + LOGGER.error("Unexpected throwable while invoking!", t); } - // This will only be reached when there is an exception. + // This will only be reached when there is a throwable. state_ = FrameBufferState.AWAITING_CLOSE; requestSelectInterestChange(); }