rakeshadr commented on code in PR #3517:
URL: https://github.com/apache/ozone/pull/3517#discussion_r899741257
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/cli/GenericCli.java:
##########
@@ -52,6 +53,10 @@ public class GenericCli implements Callable<Void>,
GenericParentCommand {
public GenericCli() {
cmd = new CommandLine(this);
+ cmd.setExecutionExceptionHandler((ex, commandLine, parseResult) -> {
+ printError(ex);
Review Comment:
Thanks @duongnguyen0 for the contribution. Overall patch looks nice.
Existing
[GenericCli.java#L88](https://github.com/apache/ozone/blob/master/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/cli/GenericCli.java#L88)
`printError()` function is using exception cause, if its not null. Could you
please check the print message in your patch and whether its giving proper err
message. Probably you can compare it with the existing code especially on
server exception cases.
`printError(ex.getCause() == null ? ex : ex.getCause());`
--
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]