You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a question/observation than an issue.
Should Exceptions in plugins bomb the whole app? Or the page trying to render it? I ask this because in trying to get plugins to work I have hit issues, most of them my own fault in how I am installing the plugin or the plugin itself may be faulty.
I've implemented a facade so I catch the exception and log it instead of throwing. But if someone was using the @Inject annotation then it would cause that page to throw an exception during rendering.
It may be too low of a level to make PluginManager catch this and I'm not sure if PluginComponentInjector could catch it and log it but it's something to think about. It seems most people would want the PluginManager.getExtensions to return an empty list in this case.
Maybe a configurable ExceptionHandler could be added. By default it could throw. Just a thought.
The text was updated successfully, but these errors were encountered:
I don't know what to say. In other project available on Github I used runtime exception and I think that it's not bad.
I reviewed DefaultPluginManager.getExtension() -> AbstractextensionFinder.find(...) and I don't see where and what exception is thrown. All exceptions (non RuntimeException) are logged.
I was referring to RuntimeExceptions. Two of the ones I hit were IllegalArgumentException and FileSystemAlreadyExistsException which I reference here #5.
Hitting these exceptions made the whole page unusable. An app that allows for plugins should guard itself against failures in the plugins. Although I'm not sure it's PF4J's responsibility to do this. Or maybe it is. I just brought it up as a possible improvement to the library.
This is more of a question/observation than an issue.
Should Exceptions in plugins bomb the whole app? Or the page trying to render it? I ask this because in trying to get plugins to work I have hit issues, most of them my own fault in how I am installing the plugin or the plugin itself may be faulty.
I've implemented a facade so I catch the exception and log it instead of throwing. But if someone was using the @Inject annotation then it would cause that page to throw an exception during rendering.
It may be too low of a level to make PluginManager catch this and I'm not sure if PluginComponentInjector could catch it and log it but it's something to think about. It seems most people would want the PluginManager.getExtensions to return an empty list in this case.
Maybe a configurable ExceptionHandler could be added. By default it could throw. Just a thought.
The text was updated successfully, but these errors were encountered: