Merge pull request #13041 from rmuir/consistent_formatting
Use StartupError to format all exceptions hitting the console
This commit is contained in:
commit
2ecf9af71d
|
@ -222,7 +222,16 @@ public class Bootstrap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Throwable {
|
/** 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 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