@Component(value="cuba_ExceptionHandlers")
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
Constructor and Description |
---|
ExceptionHandlers() |
Modifier and Type | Method and Description |
---|---|
void |
addHandler(ExceptionHandler handler)
Adds new Web-level handler if it is not yet registered.
|
void |
createByConfiguration()
Create all handlers defined by
ExceptionHandlersConfiguration beans in spring.xml and
GUI handlers defined as Spring-beans. |
void |
createMinimalSet()
Create a minimal set of handlers for disconnected client.
|
ExceptionHandler |
getDefaultHandler() |
void |
handle(java.lang.Thread thread,
java.lang.Throwable exception,
com.haulmont.cuba.desktop.sys.DesktopWindowManager windowManager)
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 ExceptionHandler getDefaultHandler()
public void setDefaultHandler(ExceptionHandler defaultHandler)
defaultHandler
- default handler instancepublic void addHandler(ExceptionHandler handler)
handler
- handler instancepublic void handle(java.lang.Thread thread, java.lang.Throwable exception, com.haulmont.cuba.desktop.sys.DesktopWindowManager windowManager)
thread
- current threadexception
- exception instancewindowManager
- public void createByConfiguration()
ExceptionHandlersConfiguration
beans in spring.xml and
GUI handlers defined as Spring-beans.public void createMinimalSet()
public void removeAll()