bipinprasad commented on a change in pull request #3292:
URL: https://github.com/apache/storm/pull/3292#discussion_r445136406



##########
File path: storm-client/src/jvm/org/apache/storm/utils/Utils.java
##########
@@ -1020,11 +1049,26 @@ public static UncaughtExceptionHandler 
createDefaultUncaughtExceptionHandler() {
             }
         };
     }
-    
+
+    public static UncaughtExceptionHandler 
createWorkerUncaughtExceptionHandler() {
+        return (thread, thrown) -> {
+            try {
+                handleWorkerUncaughtException(thrown);
+            } catch (Error err) {
+                LOG.error("Received error in thread {}.. terminating 
worker...", thread.getName(), err);
+                Runtime.getRuntime().exit(-2);

Review comment:
       Should this just rethrow a RuntimeException so it can be handled by the 
parent up the hierarchy (i.e. no catch block here).




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to