Class SystemErrorHandler

java.lang.Object
com.vaadin.client.SystemErrorHandler

public class SystemErrorHandler extends Object
Handles system errors in the application.
Since:
1.0
Author:
Vaadin Ltd
  • Constructor Details

    • SystemErrorHandler

      public SystemErrorHandler(Registry registry)
      Creates a new instance connected to the given registry.
      Parameters:
      registry - the global registry
  • Method Details

    • handleSessionExpiredError

      public void handleSessionExpiredError(String details)
      Shows the session expiration notification.
      Parameters:
      details - message details or null if there are no details
    • handleUnrecoverableError

      protected void handleUnrecoverableError(String details, ErrorMessage message)
      Shows an error notification for an error which is unrecoverable.
      Parameters:
      details - message details or null if there are no details
      message - an ErrorMessage describing the error
    • handleUnrecoverableError

      public void handleUnrecoverableError(String caption, String message, String details, String url)
      Shows an error notification for an error which is unrecoverable, using the given parameters.
      Parameters:
      caption - the caption of the message
      message - the message body
      details - message details or null if there are no details
      url - a URL to redirect to when the user clicks the message or null to refresh on click
    • handleUnrecoverableError

      public void handleUnrecoverableError(String caption, String message, String details, String url, String querySelector)
      Shows an error notification for an error which is unrecoverable, using the given parameters.
      Parameters:
      caption - the caption of the message
      message - the message body
      details - message details or null if there are no details
      url - a URL to redirect to when the user clicks the message or null to refresh on click
      querySelector - query selector to find the element under which the error will be added . If element is not found or the selector is null, body will be used
    • handleError

      public void handleError(String errorMessage)
      Shows the given error message if not running in production mode and logs it to the console if running in production mode.
      Parameters:
      errorMessage - the error message to show
    • handleError

      public void handleError(Throwable throwable)
      Shows an error message if not running in production mode and logs it to the console if running in production mode.
      Parameters:
      throwable - the throwable which occurred