rdblue commented on a change in pull request #1427:
URL: https://github.com/apache/iceberg/pull/1427#discussion_r485164852



##########
File path: hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java
##########
@@ -277,7 +277,7 @@ public boolean dropNamespace(Namespace namespace) {
       return true;
 
     } catch (InvalidOperationException e) {
-      throw new NamespaceNotEmptyException("Namespace " + namespace + " is not 
empty. One or more tables exist.", e);
+      throw new NamespaceNotEmptyException(e, "Namespace %s is not empty. One 
or more tables exist.", namespace);

Review comment:
       Maybe we should use a factory method that checks whether the last 
argument is an exception and calls the constructor appropriately. Then we 
wouldn't have to remember to do this.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to