Closed mlopezFC closed 3 years ago
I'm not sure if "extract[ing] those multiple problems from an exception, and show them on a grid in the dialog" should be part of the addon, but we definitely need some kind of UI provider / extension point (which, in turn, can be implemented in order to provide such feature).
Yes, maybe by just providing some kind of processor that takes the exception as an input and then produces a Vaadin component that can be shown in the dialog as an output would be enough, so any kind of customization can be allowed.
It's already possible with the current API:
ErrorWindow
(or implement your own dialog, it doesn't have to be based on ErrorWindow
) ErrorWindowFactory
that either unconditionally displays your custom dialog, or displays your custom dialog for some exception types (see #27 for a minor enhancement).VaadinServiceInitListener
that sets the custom factory (ErrorWindowFactory.setErrorWindowFactory
).There is room for improvement in the ErrorWindow
class, but that would be better discussed as specific requests for enhancement, such as #28
Assigned to @mlopezFC for discussion or closing.
Excellent analysis. A custom dialog that shows several issues for the same exception is too close to application logic (ie: depends on a specific exception type that is able to "carry" several different errors), so it might be outside the scope of this addon, but at least is good to know that there is a way of doing this using the current API.
Sometimes exceptions can be wrappers carrying out several problems in an "umbrella" exception. It would be great to design a mechanism so a provider can be configured, to extract those multiple problems from an exception, and show them on a grid in the dialog. Given that several problems happened probably they happened in different times, so a column would be needed to inform the date and time of those errors, and then in another column the description.