You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by Randgalt <gi...@git.apache.org> on 2015/06/20 16:31:33 UTC

[GitHub] curator pull request: CURATOR-219 Catch Exceptions, not Throwables

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

    https://github.com/apache/curator/pull/78#discussion_r32884938
  
    --- 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 --
    
    I don't understand how this is an improvement. Exceptions such as NPE or OOM would be lost with this change. By catching Throwable, those exceptions are logged.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---