This provides a RuntimeException for InitializationExceptions to the plugin lib along with error handling for the plugin initialization.
This allows a plugin to throw an InitializationException if it is unable to init properly. Implementation details left to the plugin.
This has the limitation of requiring plugins that want this feature to implement the PluginConfiguration interface. Throwing exceptions
in the constructor will still be handled stopping the JVM but will be less graceful.
Additionally the exception handling in PluginManagerImpl is NOT absolutely necessary. However without it the stacktrace on JVM exit is 10x as long
and can be misleading IMO. It will have a large numbef of guice initialization failures in other parts of the system complaining about akka actor setup
etc. With this error handling in place it is a simple stack trace of the issue.
This is part 1 of the full implementation regarding the filed JIRA. The heart of the solution is in the plugin.
Hard coding the crashing strategy here seems inconsistent with how we treat other dependencies (in this module and others): other dependencies are provided as parameters to the Module class.