virajjasani commented on code in PR #4671:
URL: https://github.com/apache/hadoop/pull/4671#discussion_r936068765
##########
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:
But if you still think we should not include cause.getMessage() in addition
to this.getMessage(), I can remove it. It's just that we would be able to
include one more layer of message to the existing message if we can include
cause.getMessage() as well, just a minor improvement.
--
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]