Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B0CE10A26 for ; Thu, 5 Dec 2013 17:36:56 +0000 (UTC) Received: (qmail 93607 invoked by uid 500); 5 Dec 2013 17:36:46 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 93579 invoked by uid 500); 5 Dec 2013 17:36:46 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 93506 invoked by uid 99); 5 Dec 2013 17:36:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 17:36:42 +0000 Date: Thu, 5 Dec 2013 17:36:42 +0000 (UTC) From: "Sean Busbey (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-1965) Invalid table names (& namespaces) should have dedicated error codes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACCUMULO-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13840317#comment-13840317 ] Sean Busbey commented on ACCUMULO-1965: --------------------------------------- bq. In essence, I think: if we document what are valid arguments, and you're a consumer of that API, then you need to ensure that the arguments you provide are valid arguments. This is true for anything using the API... whether you are an end user, or a wrapper. +1 I agree with Christopher. Consider some example uses of our API. with additional exception types: {code} public void userProvidedTable(String table) { try { connection.tableOperations().create(table); // ... } catch (InvalidTableNameException exception) { // Provide user feedback about problem } } {code} with an validity helper method {code} public void userProvidedTable(String table) { if (!(TableOperationsHelper.isValidTableName(table))) { // Provide user feedback about problem } connection.tableOperations().create(table); // ... } {code} The validity of the table name isn't an unexpected situation that you can't know before you make the call (like e.g. if the table will exist when Accumulo goes to actually make the table). > Invalid table names (& namespaces) should have dedicated error codes > -------------------------------------------------------------------- > > Key: ACCUMULO-1965 > URL: https://issues.apache.org/jira/browse/ACCUMULO-1965 > Project: Accumulo > Issue Type: Bug > Components: client > Reporter: John Vines > > To improve the client API, we should minimize the number of exceptions that require String parsing to determine the exception type. Table naming errors is one of them. -- This message was sent by Atlassian JIRA (v6.1#6144)