Return-Path: Delivered-To: apmail-hadoop-zookeeper-dev-archive@minotaur.apache.org Received: (qmail 79506 invoked from network); 9 Oct 2009 00:44:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Oct 2009 00:44:56 -0000 Received: (qmail 50442 invoked by uid 500); 9 Oct 2009 00:44:55 -0000 Delivered-To: apmail-hadoop-zookeeper-dev-archive@hadoop.apache.org Received: (qmail 50304 invoked by uid 500); 9 Oct 2009 00:44:55 -0000 Mailing-List: contact zookeeper-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-dev@hadoop.apache.org Delivered-To: mailing list zookeeper-dev@hadoop.apache.org Received: (qmail 49962 invoked by uid 99); 9 Oct 2009 00:44:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 00:44:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 00:44:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4E30F234C04B for ; Thu, 8 Oct 2009 17:44:31 -0700 (PDT) Message-ID: <761074119.1255049071308.JavaMail.jira@brutus> Date: Thu, 8 Oct 2009 17:44:31 -0700 (PDT) From: "Mahadev konar (JIRA)" To: zookeeper-dev@hadoop.apache.org Subject: [jira] Updated: (ZOOKEEPER-510) zkpython lumps all exceptions as IOError, needs specialized exceptions for KeeperException types In-Reply-To: <241828664.1250716514978.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ZOOKEEPER-510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mahadev konar updated ZOOKEEPER-510: ------------------------------------ Resolution: Fixed Hadoop Flags: [Reviewed] Status: Resolved (was: Patch Available) I just committed this. thanks henry! > zkpython lumps all exceptions as IOError, needs specialized exceptions for KeeperException types > ------------------------------------------------------------------------------------------------ > > Key: ZOOKEEPER-510 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-510 > Project: Zookeeper > Issue Type: Bug > Components: contrib-bindings > Affects Versions: 3.2.0 > Reporter: Patrick Hunt > Assignee: Henry Robinson > Fix For: 3.3.0 > > Attachments: ZOOKEEPER-510.patch, ZOOKEEPER-510.patch, ZOOKEEPER-510.patch, ZOOKEEPER-510.patch > > > The current zkpython bindings always throw "IOError("text")" exceptions, even for ZK specific exceptions such as NODEEXISTS. This makes it difficult (error prone) to handle exceptions in python code. You can't easily pickup a connection loss vs a node exists for example. Of course you could match the error string, but this seems like a bad idea imo. > We need to add specific exception types to the python binding that map directly to KeeperException/java types. It would also be useful to include the information provided by the KeeperException (like path in some cases), etc... as part of the error thrown to the python code. Would probably be a good idea to stay as close to java api as possible wrt mapping the errors. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.