virajjasani commented on code in PR #4671:
URL: https://github.com/apache/hadoop/pull/4671#discussion_r936061077


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java:
##########
@@ -94,7 +94,12 @@ public String toString() {
       if (message == null) {
         message = super.toString();
       }
-      return Integer.toString(status) + ": " + message;
+      String finalString = status + ": " + message;
+      Throwable cause = getCause();
+      if (cause != null) {
+        finalString = finalString + " : \n" + "cause: " + cause.getMessage();
+      }
+      return finalString;

Review Comment:
   > just exit code and message
   
   In a way, we are just improving the message by also including cause message 
if any cause is associated. I just thought it would be good improvement. We are 
still not including `exception type` even with this patch as the Javadoc 
claims. Only if we print the cause itself, then we would have included 
exception type. WDYT?



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

To unsubscribe, e-mail: [email protected]

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