You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "mattisonchao (via GitHub)" <gi...@apache.org> on 2023/06/07 01:26:54 UTC

[GitHub] [pulsar] mattisonchao commented on a diff in pull request #20503: [fix][admin] Make failed `bin/pulsar-admin source` command exit with code `1 (failed)` instead of `0 (success)`

mattisonchao commented on code in PR #20503:
URL: https://github.com/apache/pulsar/pull/20503#discussion_r1220657496


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java:
##########
@@ -119,7 +119,7 @@ void run() throws Exception {
                 System.err.println();
                 String chosenCommand = jcommander.getParsedCommand();
                 getUsageFormatter().usage(chosenCommand);
-                return;
+                throw e;

Review Comment:
   Q: Have you tested whether the throw will print the exception stack trace? Since line 118 has already printed the error info. 



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org