rdhabalia commented on a change in pull request #2353: Set correct exception if 
function runnable fails with Error
URL: https://github.com/apache/incubator-pulsar/pull/2353#discussion_r209156000
 
 

 ##########
 File path: 
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
 ##########
 @@ -233,8 +235,8 @@ public void run() {
                 }
             }
         } catch (Throwable t) {
-            log.error("Uncaught exception in Java Instance", t);
-            deathException = (Exception) t;
+            log.error("[{}] Uncaught exception in Java Instance", 
functionName, t);
+            deathException = (t instanceof Exception) ? (Exception) t : 
t.getCause();
 
 Review comment:
   oops.. I didn't realize it. fixed it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to