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

ASF GitHub Bot commented on CURATOR-219:
----------------------------------------

Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/curator/pull/78#discussion_r32884956
  
    --- Diff: 
curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
 ---
    @@ -812,31 +812,28 @@ private void 
performBackgroundOperation(OperationAndData<?> operationAndData)
                     queueOperation(operationAndData);
                 }
             }
    -        catch ( Throwable e )
    +        catch ( CuratorConnectionLossException e )
    --- End diff --
    
    Similar to above. If Throwable is not caught, the exception will be lost. 
By catching Throwable, the exception will get logged.


> Avoid use of Throwable
> ----------------------
>
>                 Key: CURATOR-219
>                 URL: https://issues.apache.org/jira/browse/CURATOR-219
>             Project: Apache Curator
>          Issue Type: Bug
>            Reporter: Mike Drob
>            Assignee: Jordan Zimmerman
>             Fix For: awaiting-response
>
>
> We liberally catch {{Throwable}} in our code, which can mask more troubling 
> issues like {{OutOfMemory}} or other errors. In most cases we should be 
> catching Exception instead.



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

Reply via email to