You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Joseph Koshy (JIRA)" <ji...@apache.org> on 2010/04/22 06:58:49 UTC

[jira] Created: (ZOOKEEPER-748) zkPython's NodeExistsException should include information about the node that exists

zkPython's NodeExistsException should include information about the node that exists
------------------------------------------------------------------------------------

                 Key: ZOOKEEPER-748
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-748
             Project: Zookeeper
          Issue Type: Improvement
          Components: contrib-bindings
    Affects Versions: 3.3.0
            Reporter: Joseph Koshy


Currently the code creates a {{zookeeper.NodeExistsException}} object with a string argument "node exists".

Including the name of the node that caused the exception would be useful, in that it allows user code like the following:
{code:title=example1}
try:
  zookeeper.create(zh, n1, ...)
  zookeeper.create(zh, n2, ...)
except zookeeper.NodeExistsException, n:
  print "Node \"%s\" exists." % n
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-748) zkPython's NodeExistsException should include information about the node that exists

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-748:
-----------------------------------

    Fix Version/s: 3.4.0

Good idea. The keeper exception has a "path" field, this should be exposed by zkpython. (in all cases, not just for node exists)

> zkPython's NodeExistsException should include information about the node that exists
> ------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-748
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-748
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bindings
>    Affects Versions: 3.3.0
>            Reporter: Joseph Koshy
>             Fix For: 3.4.0
>
>
> Currently the code creates a {{zookeeper.NodeExistsException}} object with a string argument "node exists".
> Including the name of the node that caused the exception would be useful, in that it allows user code like the following:
> {code:title=example1}
> try:
>   zookeeper.create(zh, n1, ...)
>   zookeeper.create(zh, n2, ...)
> except zookeeper.NodeExistsException, n:
>   print "Node \"%s\" exists." % n
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.