Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
 

com.newstep.solid.management
Class ErrorHandler
Direct Known Subclasses:
       ComponentErrorHandler, DefaultErrorHandler

public abstract class ErrorHandler      
The system error handler applied by the application and its subsystems to deal with unhandled Throwables.
The ErrorHandler should be used at the root of all execution paths to catch unhandled exceptions and error.
Example:
Callable.call() {
try {
catch(MyException myException) {
// handle the exception
} catch(Throwable throwable) {
ErrorHandler.handle();
}
}
Abstract.
 
Links:
Kernel Association Association Link
to Class ErrorHandler
the sub handler assigned to override the default handling
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
 
 

Field Summary
private final static String
private static ErrorHandler
private static Logger
Method Summary
public abstract void
doHandle(Throwable throwable)
public static synchronized final ErrorHandler
public static synchronized final void
handle(Throwable throwable)
public abstract void
public static final void
public static synchronized final void
setHandler(ErrorHandler errorHandler)
Field Detail
className
private final static String className
Final.
Multiplicity:
1
Static.
 

delegateHandler
private static ErrorHandler delegateHandler
the sub handler assigned to override the default handling
Multiplicity:
1
Static.
 

logger
private static Logger logger
logging members
Multiplicity:
1
Static.
 
Method Detail
doHandle
public abstract void doHandle (Throwable throwable)
 
abstract method must be implemented by ErrorHandler derivations in order
to handle the throwables. The derivation MUST also be installed in the
ErrorHandler via the init or setDelegateErrorHandlerMethods
Parameters:
throwable the throwable to handle
Abstract.
 

getHandler
public static synchronized final ErrorHandler getHandler ()
 
Return:
the current ErrorHandler
Final.
Static.
Synchronized.
 

handle
public static synchronized final void handle (Throwable throwable)
 
handles the exception by propagating it to the subhandler if one exists.
Otherwise the default handling is applied.
Parameters:
throwable the throwable to be handled
Final.
Static.
Synchronized.
 

init
public abstract void init (ErrorHandlerConfig config)
 
abstract method must be implemented by ErrorHandler derivation in order
to enable configuration in a consistent manner.
Parameters:
config the ErrorHandler configuration with which to configure the handler
Abstract.
 

init
public static final void init ()
 
initializes the error handler to the default handler
Final.
Static.
 

setHandler
public static synchronized final void setHandler (ErrorHandler errorHandler)
 
installs the specified error handler
Parameters:
errorHandler the ErrorHandler to install
Final.
Static.
Synchronized.
 

Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD