accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-1965) Invalid table names (& namespaces) should have dedicated error codes
Date Thu, 05 Dec 2013 17:14:35 GMT


Christopher Tubbs commented on ACCUMULO-1965:

I think API design principles tend to apply regardless of the argument of whether or not the
API is "user facing". I can't see how we could even make that distinction, anyway... because
all APIs are subject to being wrapped.

I just don't see a problem with the basic IllegalArgumentException with an informative message.
If the API is wrapped and gets arguments from users, it should do its own argument validation
before passing to Accumulo's API. We could make it easier to do this argument validation,
though... and I think I'd prefer that option if there's a sensible way to do that. However,
we already throw IllegalArgumentException for a lot of our API if the argument is unexpectedly
null... and from an API perspective, I'm not sure this kind of error is functionally any different
than that kind of error... they're both illegal arguments.

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.

> Invalid table names (& namespaces) should have dedicated error codes
> --------------------------------------------------------------------
>                 Key: ACCUMULO-1965
>                 URL:
>             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

View raw message