mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
Cli tools currently catch all exceptions, and only print the exception message, except when a special system property is set. Even with this flag set, certain exceptions, like IOException, are captured and their stack trace is always lost. This change adds a UserError class, which can be used a cli tools to specify a message to the user, as well as an exit status. All other exceptions are propagated out of main, so java will exit with non-zero and print the stack trace.