Class ErrorHandlerUtil

java.lang.Object
com.vaadin.flow.server.ErrorHandlerUtil

public final class ErrorHandlerUtil extends Object
Utility class for use with ErrorHandler to show HasErrorParameter view when an exception happens during a RPC call outside of navigation.
  • Constructor Details

    • ErrorHandlerUtil

      public ErrorHandlerUtil()
  • Method Details

    • handleErrorByRedirectingToErrorView

      public static boolean handleErrorByRedirectingToErrorView(Throwable throwable)
      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 for
      context - current VaadinContex instance
      ui - current UI instance
      Returns:
    • handleErrorByRedirectingToErrorView

      public static boolean handleErrorByRedirectingToErrorView(Exception exception)
      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 for
      context - current VaadinContex instance
      ui - current UI instance
      Returns: