You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/04/03 19:11:50 UTC

[GitHub] [incubator-pinot] fx19880617 commented on a change in pull request #4065: Exit 1 when caught exception in Pinot Admin command.

fx19880617 commented on a change in pull request #4065: Exit 1 when caught exception in Pinot Admin command.
URL: https://github.com/apache/incubator-pinot/pull/4065#discussion_r271891053
 
 

 ##########
 File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java
 ##########
 @@ -102,10 +102,13 @@ public void execute(String[] args)
     }
   }
 
-  public static void main(String[] args)
-      throws Exception {
+  public static void main(String[] args) {
     PinotAdministrator pinotAdministrator = new PinotAdministrator();
-    pinotAdministrator.execute(args);
+    try {
+      pinotAdministrator.execute(args);
+    } catch (Exception e) {
+      System.exit(1);
 
 Review comment:
   Actually the exception will be caught in execute() method. Will let this method do logging, and let main() function check status and do exit.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org