Package com.vaadin.flow.server
Class ErrorHandlerUtil
java.lang.Object
com.vaadin.flow.server.ErrorHandlerUtil
Utility class for use with ErrorHandler to show HasErrorParameter view when
an exception happens during a RPC call outside of navigation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhandleErrorByRedirectingToErrorView(Exception exception) Check if matching error handler target exists for exception and redraw view using ErrorTarget.static booleanhandleErrorByRedirectingToErrorView(Exception exception, VaadinContext context, UI ui) Check if matching error handler target exists for exception and redraw view using ErrorTarget.static booleanhandleErrorByRedirectingToErrorView(Throwable throwable) Check throwable is Exception and redraw error view if matching error handler target exists.static booleanhandleErrorByRedirectingToErrorView(Throwable throwable, VaadinContext context, UI ui) Check throwable is Exception and redraw error view if matching error handler target exists.
-
Constructor Details
-
ErrorHandlerUtil
public ErrorHandlerUtil()
-
-
Method Details
-
handleErrorByRedirectingToErrorView
Check throwable is Exception and redraw error view if matching error handler target exists.- Parameters:
throwable- throwable to find handler for- Returns:
trueif error handled,falseif no error handler
-
handleErrorByRedirectingToErrorView
public static boolean handleErrorByRedirectingToErrorView(Throwable throwable, VaadinContext context, UI ui) Check throwable is Exception and redraw error view if matching error handler target exists.- Parameters:
throwable- throwable to find handler forcontext- currentVaadinContexinstanceui- current UI instance- Returns:
trueif error handled,falseif no error handler
-
handleErrorByRedirectingToErrorView
Check if matching error handler target exists for exception and redraw view using ErrorTarget.- Parameters:
exception- exception to find handler for- Returns:
trueif error handled,falseif no error handler
-
handleErrorByRedirectingToErrorView
public static boolean handleErrorByRedirectingToErrorView(Exception exception, VaadinContext context, UI ui) Check if matching error handler target exists for exception and redraw view using ErrorTarget.- Parameters:
exception- exception to find handler forcontext- currentVaadinContexinstanceui- current UI instance- Returns:
trueif error handled,falseif no error handler
-