[ 
https://issues.apache.org/jira/browse/DL-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15753423#comment-15753423
 ] 

ASF GitHub Bot commented on DL-136:
-----------------------------------

GitHub user brennonyork opened a pull request:

    https://github.com/apache/incubator-distributedlog/pull/74

    DL-136: Avoid empty catch blocks

    * resolves the 9 empty catch blocks in `src/main`
    * leaves 49 errors within `src/test` unchanged
      * if we want to resolve those as well let me know, wasn't sure how we 
wanted to handle that
    
    Used an independent checkstyle that looked for [empty catch 
blocks](http://checkstyle.sourceforge.net/config_blocks.html#EmptyBlock). Did a 
quick manual analysis and cannot find any other empty catch blocks in 
`src/main` so cannot rectify the original 22 as stated in the [Kiuwan 
blog](https://www.kiuwan.com/blog/analyzing_distributedlog_twitter-2/).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/brennonyork/incubator-distributedlog DL-136

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-distributedlog/pull/74.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #74
    
----
commit 83fc9880135d5e32dd81a68b32be423732cf4837
Author: Brennon York <[email protected]>
Date:   2016-12-16T04:16:18Z

    updated catch blocks for async reader benchmark

commit 7decca2d173d10a6bfefc13a64a5fe40b1f0ebe2
Author: Brennon York <[email protected]>
Date:   2016-12-16T04:28:13Z

    updated warn text for async reader, added catch blocks for ledger read 
benchmark

commit 3a2b5533f683f5d51cc865fbe8d6a25cc850ff1b
Author: Brennon York <[email protected]>
Date:   2016-12-16T04:34:40Z

    updated logging verbage, added catch blocks for sync reader and zkmetadata 
resolver

----


> Avoid empty catch blocks
> ------------------------
>
>                 Key: DL-136
>                 URL: https://issues.apache.org/jira/browse/DL-136
>             Project: DistributedLog
>          Issue Type: Task
>            Reporter: Sijie Guo
>            Assignee: Brennon York
>              Labels: help-wanted
>
> Based on the code analysis here : 
> https://www.kiuwan.com/blog/analyzing_distributedlog_twitter-2/, there are 22 
> Times: Catching exceptions with empty bodies.
> {quote}
> There are exceptions of different types: InterruptedException, 
> KeeperException, Exception, etc.. Even though we think that these exceptions 
> should never occur, if they are captured it means that they are technically 
> possible. In case that they do happen, it will be very difficult to know what 
> is happening and to diagnose the problem. It is very recommendable, at least 
> to add a log trace, in case these exceptions are triggered.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to