david-streamlio commented on a change in pull request #10270:
URL: https://github.com/apache/pulsar/pull/10270#discussion_r616257832



##########
File path: 
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
##########
@@ -324,7 +327,11 @@ private void processResult(Record srcRecord,
                 srcRecord.fail();
             } else {
                 if (result1.getResult() != null) {
-                    sendOutputMessage(srcRecord, result1.getResult());
+                    try {
+                                               sendOutputMessage(srcRecord, 
result1.getResult());
+                                       } catch (Exception ex) {
+                                               throw new 
CompletionException(ex);

Review comment:
       Solution based roughly on 
[this](https://stackoverflow.com/questions/44409962/throwing-exception-from-completablefuture)
 suggestion. 




-- 
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