public class ExceptionHandlers
extends java.lang.Object
A set of exception handlers is configured by defining ExceptionHandlersConfiguration
beans
in spring.xml. If a project needs specific handlers, it should define a bean of such type with its own
id, e.g. refapp_ExceptionHandlersConfiguration
An instance of this class is bound to App
.
Constructor and Description |
---|
ExceptionHandlers(App app) |
Modifier and Type | Method and Description |
---|---|
void |
addHandler(ExceptionHandler handler)
Adds new Web-level handler if it is not yet registered.
|
void |
addHandler(GenericExceptionHandler handler)
Adds new GUI-level handler if it is not yet registered.
|
void |
createByConfiguration()
Create all Web handlers defined by
ExceptionHandlersConfiguration beans in spring.xml and
GUI handlers defined as Spring-beans. |
ExceptionHandler |
getDefaultHandler() |
void |
handle(com.vaadin.server.ErrorEvent event)
Delegates exception handling to registered handlers.
|
void |
removeAll()
Remove all handlers.
|
void |
setDefaultHandler(ExceptionHandler defaultHandler)
Set the default handler instead of initialized in constructor.
|
public ExceptionHandlers(App app)
public ExceptionHandler getDefaultHandler()
public void setDefaultHandler(ExceptionHandler defaultHandler)
defaultHandler
- default handler instancepublic void addHandler(ExceptionHandler handler)
handler
- handler instancepublic void addHandler(GenericExceptionHandler handler)
handler
- handler instancepublic void handle(com.vaadin.server.ErrorEvent event)
event
- error event generated by Vaadinpublic void createByConfiguration()
ExceptionHandlersConfiguration
beans in spring.xml and
GUI handlers defined as Spring-beans.public void removeAll()