Class ErrorManager
java.lang.Object
com.flowingcode.vaadin.addons.errorwindow.ErrorManager
Manages errors and displays error messages through different ErrorWindowFactory implementations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorWindowFactoryGets the default ErrorWindowFactory implementation.static ErrorWindowFactorygetErrorWindowFactory(Class<?> clazz) Gets the ErrorWindowFactory implementation for the specified class or its super classes.static voidsetErrorWindowFactory(ErrorWindowFactory errorWindowFactory) Sets the default ErrorWindowFactory implementation.static voidsetErrorWindowFactory(Class<? extends Throwable> clazz, ErrorWindowFactory errorWindowFactory) Sets the ErrorWindowFactory for the specified Throwable class.static voidDisplays an error message for the given Throwable.static voidDisplays an error message for the given Throwable with the specified cause message.
-
Method Details
-
showError
Displays an error message for the given Throwable.- Parameters:
throwable- the Throwable object for which the error message should be displayed
-
showError
Displays an error message for the given Throwable with the specified cause message.- Parameters:
throwable- the Throwable object for which the error message should be displayedcause- the cause for the error
-
setErrorWindowFactory
public static void setErrorWindowFactory(Class<? extends Throwable> clazz, ErrorWindowFactory errorWindowFactory) Sets the ErrorWindowFactory for the specified Throwable class.- Parameters:
clazz- the class of Throwable for which the ErrorWindowFactory should be seterrorWindowFactory- the ErrorWindowFactory implementation to be set for the specified class
-
getErrorWindowFactory
Gets the ErrorWindowFactory implementation for the specified class or its super classes.- Parameters:
clazz- the class for which the ErrorWindowFactory implementation is needed- Returns:
- the ErrorWindowFactory implementation associated with the specified class or its super classes
-
setErrorWindowFactory
Sets the default ErrorWindowFactory implementation.- Parameters:
errorWindowFactory- the default ErrorWindowFactory implementation to be set
-
getErrorWindowFactory
Gets the default ErrorWindowFactory implementation.- Returns:
- the default ErrorWindowFactory implementation
-