Package com.vaadin.client
Class SystemErrorHandler
java.lang.Object
com.vaadin.client.SystemErrorHandler
Handles system errors in the application.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Constructor Summary
ConstructorsConstructorDescriptionSystemErrorHandler(Registry registry) Creates a new instance connected to the given registry. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleError(String errorMessage) Shows the given error message if not running in production mode and logs it to the console if running in production mode.voidhandleError(Throwable throwable) Shows an error message if not running in production mode and logs it to the console if running in production mode.voidhandleSessionExpiredError(String details) Shows the session expiration notification.protected voidhandleUnrecoverableError(String details, ErrorMessage message) Shows an error notification for an error which is unrecoverable.voidhandleUnrecoverableError(String caption, String message, String details, String url) Shows an error notification for an error which is unrecoverable, using the given parameters.voidhandleUnrecoverableError(String caption, String message, String details, String url, String querySelector) Shows an error notification for an error which is unrecoverable, using the given parameters.
-
Constructor Details
-
SystemErrorHandler
Creates a new instance connected to the given registry.- Parameters:
registry- the global registry
-
-
Method Details
-
handleSessionExpiredError
Shows the session expiration notification.- Parameters:
details- message details or null if there are no details
-
handleUnrecoverableError
Shows an error notification for an error which is unrecoverable.- Parameters:
details- message details or null if there are no detailsmessage- an ErrorMessage describing the error
-
handleUnrecoverableError
Shows an error notification for an error which is unrecoverable, using the given parameters.- Parameters:
caption- the caption of the messagemessage- the message bodydetails- message details ornullif there are no detailsurl- a URL to redirect to when the user clicks the message ornullto 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 messagemessage- the message bodydetails- message details ornullif there are no detailsurl- a URL to redirect to when the user clicks the message ornullto refresh on clickquerySelector- query selector to find the element under which the error will be added . If element is not found or the selector isnull, body will be used
-
handleError
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
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
-