mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-13 08:25:26 +00:00
By default, when an exception causes the JVM to terminate, the stack trace is printed. In the case of failing bootstrap checks, this stack trace is useless to the user, and might even distract them from seeing that the bootstrap checks failed for reasons under their control. With this commit, we cause the stack trace for a failing bootstrap check to be truncated. We also modify some methods to not declare that they throw the top level checked exception type Exception, but instead explicitly declare the exceptions that they throw. These exceptions are caught and wrapped in a BootstrapException so that we can percolate only two exception types out of Bootstrap#init as checked exception, BootstrapException and NodeValidationException. Relates #19989