ctubbsii commented on a change in pull request #337: ACCUMULO-4732 No APIs to configure iterators or locality groups for new tables URL: https://github.com/apache/accumulo/pull/337#discussion_r158184648
########## File path: core/src/main/java/org/apache/accumulo/core/client/admin/NewTableConfiguration.java ########## @@ -217,17 +215,19 @@ public NewTableConfiguration attachIterator(IteratorSetting setting) throws Accu * object specifying the properties of the iterator * @param scopes * enumerated set of iterator scopes - * @throws AccumuloException - * if a general error occurs * * @since 2.0.0 * * @see TableOperations#attachIterator(String, IteratorSetting, EnumSet) */ - public NewTableConfiguration attachIterator(IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloException { + public NewTableConfiguration attachIterator(IteratorSetting setting, EnumSet<IteratorScope> scopes) { Objects.requireNonNull(setting, "setting cannot be null!"); Objects.requireNonNull(scopes, "scopes cannot be null!"); - TableOperationsHelper.checkIteratorConflicts(iteratorProps, setting, scopes); + try { + TableOperationsHelper.checkIteratorConflicts(iteratorProps, setting, scopes); + } catch (AccumuloException e) { + throw new IllegalArgumentException(e.getMessage()); Review comment: Would it be better to convert from AccEx to IAE, as is done here, or would it be better to provide a new message, and retain the original stack trace, as in the following? `throw new IllegalArgumentException("The specified IteratorSetting conflicts with an iterator already defined on this NewTableConfiguration", e);` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services