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

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

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

    https://github.com/apache/curator/pull/78#discussion_r32885316
  
    --- Diff: 
curator-client/src/main/java/org/apache/curator/ensemble/exhibitor/ExhibitorEnsembleProvider.java
 ---
    @@ -301,7 +301,7 @@ else if ( port != thePort )
                         values.putAll(decodeExhibitorList(encoded));
                         done = true;
                     }
    -                catch ( Throwable e )
    +                catch ( Exception e )
    --- End diff --
    
    NPE still gets caught. If OOM is thrown, does it really make sense to 
retry? That's usually a pretty drastic condition and very often the JVM is not 
actually in a recoverable state. The OOM can be thrown because of a different 
thread going wonky, and we have no way to clean up the resources it was using.


> 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