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
When building a structured app, I want to be able to use customize exception handlers routes for NotFoundException and Exception extending my own classes, not the default ones (e.g. NotFoundRoute).
Currently this is not possibile, it throws:
com.vaadin.server.InvalidRouteLayoutConfigurationException: Only one target for an exception should be defined. Found 'it.axians.oss.base.vaadin.routing.NotFoundRoute' and 'com.vaadin.router.RouteNotFoundError' for exception 'com.vaadin.router.NotFoundException'
The text was updated successfully, but these errors were encountered:
So just to clarify what you would want is to have: MyNotFoundException extends MyOwnExceptionHandler implements HasErrorParameter<NotFoundException> that would override/ignore the default RouteNotFoundError class.
Instead of the current hierarchical version where it's ok to override if you extend the default class. e.g. Register a child handler if parent registered or leave as is if child registered.
* If the target is not related to the registered handler then throw configuration exception as only one handler for each exception type is allowed.
I'd want my exception handlers to extends a custom component and I'm doing this for various exception and it works very well: only problem is for 404 and 500 error codes, whose handlers are required to extend the default one provided by Flow.
I didn't dive into the internals on how Flow currently choose the handler to use, but I'd expect it to look for an implementation of HasErrorParameter<E> and fallback to the default handlers if there are none.
When building a structured app, I want to be able to use customize exception handlers routes for
NotFoundException
andException
extending my own classes, not the default ones (e.g.NotFoundRoute
).Currently this is not possibile, it throws:
The text was updated successfully, but these errors were encountered: