Преглед изворни кода

Add exit code to CLI failure termination message (#97004)

Add exit code to CLI failure termination message, to help with loopy diagnosis.
Chris Hegarty пре 2 година
родитељ
комит
bdd38c6876
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      libs/cli/src/main/java/org/elasticsearch/cli/Command.java

+ 1 - 1
libs/cli/src/main/java/org/elasticsearch/cli/Command.java

@@ -114,7 +114,7 @@ public abstract class Command implements Closeable {
     protected void printUserException(Terminal terminal, UserException e) {
         if (e.getMessage() != null) {
             terminal.errorPrintln("");
-            terminal.errorPrintln(Terminal.Verbosity.SILENT, "ERROR: " + e.getMessage());
+            terminal.errorPrintln(Terminal.Verbosity.SILENT, "ERROR: " + e.getMessage() + ", with exit code " + e.exitCode);
         }
     }