Return-Path: X-Original-To: apmail-curator-dev-archive@minotaur.apache.org Delivered-To: apmail-curator-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A8277F6D1 for ; Wed, 29 May 2013 21:00:32 +0000 (UTC) Received: (qmail 26644 invoked by uid 500); 29 May 2013 21:00:32 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 26602 invoked by uid 500); 29 May 2013 21:00:32 -0000 Mailing-List: contact dev-help@curator.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.incubator.apache.org Delivered-To: mailing list dev@curator.incubator.apache.org Received: (qmail 26592 invoked by uid 99); 29 May 2013 21:00:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 May 2013 21:00:32 +0000 X-ASF-Spam-Status: No, hits=-1998.9 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 29 May 2013 21:00:31 +0000 Received: (qmail 24486 invoked by uid 99); 29 May 2013 21:00:11 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 May 2013 21:00:11 +0000 Received: from localhost (HELO mail-la0-f53.google.com) (127.0.0.1) (smtp-auth username vines, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 May 2013 21:00:10 +0000 Received: by mail-la0-f53.google.com with SMTP id ea20so9213633lab.12 for ; Wed, 29 May 2013 14:00:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; bh=+V1/ODgXMUKt/Uq3HVUz16uy3Wn6qs2QBwYUcLiTb9E=; b=njVkOLabUiSriIiZAHXdGpSgPhWVHgqbXdy5/JnfYkkZcplnYtggFj6+NO32+9R23W WJq/R8UE13Hg5gtTe7PT2/1TDK5dM/ee/QbWYWbg1J/QfPMAsPQ3h1tWieDXSwSgYjlb mgk4PD9HFAL35L8u+UeYYvjkDcROtNnwDewsZb4XSFhsKi2Q1kaLnH33goTtMTqaxQOF ONSyO99/y/8DuQzfYvp4YNhmzQdWiWrK/sSd5a17oWVwzeNj0J3ZzvWlPP1cqYOjyALw BPF01oRinEUecAaXOzww+/EfKhDRNJRXaNSjPtWf18XhGFuiaz/ZqmIVC/0ZFXC1oR51 YxpA== X-Received: by 10.112.131.232 with SMTP id op8mr2410450lbb.2.1369861208762; Wed, 29 May 2013 14:00:08 -0700 (PDT) MIME-Version: 1.0 Reply-To: vines@apache.org Received: by 10.114.5.163 with HTTP; Wed, 29 May 2013 13:59:28 -0700 (PDT) From: John Vines Date: Wed, 29 May 2013 16:59:28 -0400 Message-ID: Subject: Curator-29 - Exception handling To: dev@curator.incubator.apache.org Content-Type: multipart/alternative; boundary=047d7b33da5ebd735704dde1aadc X-Virus-Checked: Checked by ClamAV on apache.org --047d7b33da5ebd735704dde1aadc Content-Type: text/plain; charset=ISO-8859-1 Links to make things easier for people- https://issues.apache.org/jira/browse/CURATOR-29 https://github.com/Netflix/curator/issues/13 My issue is that the forPath interface throws an Exception. I can recognize the point made that an exception is an exception is an exception and should be a failure case. And Exceptions do make everything easier internally. But it makes client writing a PITA. I think it boils down to not all failure cases being the same. Yes, there are several that can be lumped into "Something between this process and where you say Zookeeper is is broken", such as several of the KeeperExceptions, as well as InterruptedException, and the others I can spout off by running through the code. But there are also lighter exceptions that should be reported seperately. I specifically mean things like NoNodeException, NodeExistsExceptions, and InvalidACLException (not sure about that last one, haven't played with curator for ACLs yet). They should probably be rethrown as a simpler exception, but it should be explicit in the interface so users know it's coming. I can understand implementation could be a bear with it, and/or this is not a priority. If the latter, I don't mind working on it. But honestly I think this makes for poor usability in a project that tries to make a difficult to use project easier, which just doesn't seem right. But that's just my thought on the matter. --047d7b33da5ebd735704dde1aadc--