public class SystemErrorHandler extends Object
| Constructor and Description |
|---|
SystemErrorHandler(Registry registry)
Creates a new instance connected to the given registry.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
void |
handleSessionExpiredError(String details)
Shows the session expiration notification.
|
protected void |
handleUnrecoverableError(String details,
ErrorMessage message)
Shows an error notification for an error which is unrecoverable.
|
void |
handleUnrecoverableError(String caption,
String message,
String details,
String url)
Shows an error notification for an error which is unrecoverable, using
the given parameters.
|
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.
|
public SystemErrorHandler(Registry registry)
registry - the global registrypublic void handleSessionExpiredError(String details)
details - message details or null if there are no detailsprotected void handleUnrecoverableError(String details, ErrorMessage message)
details - message details or null if there are no detailsmessage - an ErrorMessage describing the errorpublic void handleUnrecoverableError(String caption, String message, String details, String url)
caption - the caption of the messagemessage - the message bodydetails - message details or null if there are no detailsurl - a URL to redirect to when the user clicks the message or
null to refresh on clickpublic void handleUnrecoverableError(String caption, String message, String details, String url, String querySelector)
caption - the caption of the messagemessage - the message bodydetails - message details or null if there are no detailsurl - a URL to redirect to when the user clicks the message or
null to refresh on clickquerySelector - 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 usedpublic void handleError(String errorMessage)
errorMessage - the error message to showpublic void handleError(Throwable throwable)
throwable - the throwable which occurredCopyright © 2000–2026 Vaadin Ltd. All rights reserved.