You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/08/10 04:45:43 UTC
[GitHub] merlimat commented on a change in pull request #2353: Set correct
exception if function runnable fails with Error
merlimat 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_r209143752
##########
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:
I think we should just remove the casting here, since `deathException` is already defined as `Throwable`.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services