THRIFT-1419. java: AbstractNonBlockingServer does not catch errors when invoking...
authorBryan Duxbury <bryanduxbury@apache.org>
Wed, 2 Nov 2011 22:40:01 +0000 (22:40 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Wed, 2 Nov 2011 22:40:01 +0000 (22:40 +0000)
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

lib/java/src/org/apache/thrift/server/AbstractNonblockingServer.java

index 2bd74fa..65d8738 100644 (file)
@@ -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();
     }