keith-turner commented on a change in pull request #1614:
URL: https://github.com/apache/accumulo/pull/1614#discussion_r428935251



##########
File path: 
core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/BulkImport.java
##########
@@ -576,7 +587,12 @@ private Text toText(byte[] row) {
         Thread.currentThread().interrupt();
         throw new RuntimeException(e);
       } catch (ExecutionException e) {
-        throw new RuntimeException(e);
+        // clean up exception for user
+        Throwable t = e.getCause();
+        if (t instanceof IllegalArgumentException) {
+          throw (IllegalArgumentException) t;
+        } else
+          throw new RuntimeException(t);

Review comment:
       I am not sure if the ExecutionException provides valuable information, 
but definitely want to wrap the IllegalArgumentException.  I would err on the 
side of caution with omiting the excution exception in that even if does not 
currently provide anything useful, it may in future versions of Java. 




----------------------------------------------------------------
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]


Reply via email to