Merge pull request #13041 from rmuir/consistent_formatting
Use StartupError to format all exceptions hitting the console
This commit is contained in:
commit
2ecf9af71d
|
@ -221,8 +221,17 @@ public class Bootstrap {
|
||||||
keepAliveLatch.countDown();
|
keepAliveLatch.countDown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Calls doMain(), but with special formatting of errors */
|
||||||
|
public static void main(String[] args) throws StartupError {
|
||||||
|
try {
|
||||||
|
doMain(args);
|
||||||
|
} catch (Throwable t) {
|
||||||
|
throw new StartupError(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Throwable {
|
public static void doMain(String[] args) throws Throwable {
|
||||||
BootstrapCLIParser bootstrapCLIParser = new BootstrapCLIParser();
|
BootstrapCLIParser bootstrapCLIParser = new BootstrapCLIParser();
|
||||||
CliTool.ExitStatus status = bootstrapCLIParser.execute(args);
|
CliTool.ExitStatus status = bootstrapCLIParser.execute(args);
|
||||||
|
|
||||||
|
@ -291,7 +300,7 @@ public class Bootstrap {
|
||||||
Loggers.enableConsoleLogging();
|
Loggers.enableConsoleLogging();
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new StartupError(e);
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue