If an unhandled exception is thrown during navigation to any of your routes, navigation is rerouted to your Error500View page automatically. You can try it by having one of your views or components implement BeforeEnterObserver and throwing an exception into the BeforeEnterObserver.beforeEnter method that your are going to implement. InternalServerError
or any custom implementation of HasErrorParameter is intended to deal with unhandled exceptions thrown during navigation process.
If an unhandled exception is thrown during navigation to any of your routes, navigation is rerouted to your Error500View page automatically.
yes this work well =)
But if I have such code
Button button = new Button("test");
button.addClickListener((ComponentEventListener<ClickEvent<Button>>) btnEvent -> {
throw new MyOwnRuntimeEx("ERROR");
});