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 boolean
handleErrorByRedirectingToErrorView
(Exception exception) Check if matching error handler target exists for exception and redraw view using ErrorTarget.static boolean
handleErrorByRedirectingToErrorView
(Exception exception, VaadinContext context, UI ui) Check if matching error handler target exists for exception and redraw view using ErrorTarget.static boolean
handleErrorByRedirectingToErrorView
(Throwable throwable) Check throwable is Exception and redraw error view if matching error handler target exists.static boolean
handleErrorByRedirectingToErrorView
(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:
true
if error handled,false
if 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
- currentVaadinContex
instanceui
- current UI instance- Returns:
-
handleErrorByRedirectingToErrorView
Check if matching error handler target exists for exception and redraw view using ErrorTarget.- Parameters:
exception
- exception to find handler for- Returns:
true
if error handled,false
if 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
- currentVaadinContex
instanceui
- current UI instance- Returns:
-