You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/03 19:30:36 UTC

[GitHub] [beam] kennknowles opened a new issue, #18617: Declare proper exception type in catch block of KafkaExactlyOnceSink#initShardWriter

kennknowles opened a new issue, #18617:
URL: https://github.com/apache/beam/issues/18617

   ```
   
         } catch (Exception e) {
           producer.close();
           throw e;
   
   ```
   
   initShardWriter throws IOException. The catch block shouldn't widen the exception type.
   If the intention is to properly close producer, we can use try-with-resources.
   
   Imported from Jira [BEAM-3677](https://issues.apache.org/jira/browse/BEAM-3677). Original Jira may contain additional context.
   Reported by: yuzhihong@gmail.com.


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

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org