You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by madrob <gi...@git.apache.org> on 2014/08/01 19:48:36 UTC

[GitHub] curator pull request: CURATOR-71 do not log-and-throw

GitHub user madrob opened a pull request:

    https://github.com/apache/curator/pull/31

    CURATOR-71 do not log-and-throw

    If we throw an exception, then there is no point in logging it since
    something further up the call stack already has to deal with it. At
    best, the exception gets logged twice, at worst we log potentially
    confusing exceptions that end up not mattering.

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

    $ git pull https://github.com/madrob/curator CURATOR-71

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

    https://github.com/apache/curator/pull/31.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 #31
    
----
commit 35278cc1b52802995ee5db017bcc84dba7c69a70
Author: Mike Drob <md...@cloudera.com>
Date:   2014-08-01T17:08:47Z

    CURATOR-71 do not log-and-throw
    
    If we throw an exception, then there is no point in logging it since
    something further up the call stack already has to deal with it. At
    best, the exception gets logged twice, at worst we log potentially
    confusing exceptions that end up not mattering.

----


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

[GitHub] curator pull request: CURATOR-71 do not log-and-throw

Posted by madrob <gi...@git.apache.org>.
Github user madrob commented on the pull request:

    https://github.com/apache/curator/pull/31#issuecomment-51126572
  
    Updated the PR to remove the first logging in ConnectionState. I think you're right about leaving the second one in, since it's covered by a boolean flag.


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

[GitHub] curator pull request: CURATOR-71 do not log-and-throw

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the pull request:

    https://github.com/apache/curator/pull/31#issuecomment-51149193
  
    The new unit test ended up in both the discovery and discovery.details packages (maybe something broke in the merge), so I removed the one in discovery as it didn't compile (package protection issues). Removed some unused imports. Good to go now, thanks.



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

[GitHub] curator pull request: CURATOR-71 do not log-and-throw

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the pull request:

    https://github.com/apache/curator/pull/31#issuecomment-51008324
  
    Thanks, looks good. I just had a quick look through the code for any other cases, and there are a couple in ConnectionStateListener. Lines 80 and 201. I think that at least the one at line 80 should also be removed. The line 201 one can be suppressed via a property, so maybe that one is not so important. What do you think?


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

[GitHub] curator pull request: CURATOR-71 do not log-and-throw

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/curator/pull/31


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

[GitHub] curator pull request: CURATOR-71 do not log-and-throw

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the pull request:

    https://github.com/apache/curator/pull/31#issuecomment-51121406
  
    Sorry, org.apache.curator.ConnectionState


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

[GitHub] curator pull request: CURATOR-71 do not log-and-throw

Posted by madrob <gi...@git.apache.org>.
Github user madrob commented on the pull request:

    https://github.com/apache/curator/pull/31#issuecomment-51060899
  
    The only ConnectionStateListener that I can find is a 30 line interface in curator-framework. Can you be more specific with where you're looking, I'm having some trouble here. Thanks.


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