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/05/09 17:36:22 UTC

[GitHub] merlimat commented on a change in pull request #1756: Throw exception of source/sink

merlimat commented on a change in pull request #1756: Throw exception of source/sink
URL: https://github.com/apache/incubator-pulsar/pull/1756#discussion_r187118203
 
 

 ##########
 File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
 ##########
 @@ -484,6 +484,7 @@ public void setupInput() throws Exception {
         } catch (Exception e) {
             log.info("Error occurred executing open for source: {}",
                     sourceSpec.getClassName(), e);
+            throw e;
 
 Review comment:
   We shouldn't be logging the exception multiple times or it can be confusing. If we're re-throwing there should be no log here. 
   
   To add context we can do like : 
   
   ```java
   throw new IOException("Failed to open sink", e);
   ```

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