|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface for error handlers, that can handle specific exceptions in specific
contexts. ExceptionHandlers are added to the
ErrorHandler singleton. The order is important, because the last
added ErrorContextHandler is threaded as the most specific; e.g. it will
be asked first to handle exceptions. If an ErrorContextHandler throws
an exception (means, it cannot handle the exception), this exception will
tried to get handled by the ErrorContextHandler added before and so on.
| Method Summary | |
boolean |
canHandle(java.lang.Object context,
java.lang.Throwable e)
Returns true, if this ErrorContextHandler can handle the
given context and Throwable. |
void |
handleError(java.lang.Object context,
java.lang.Throwable e)
Handles the exception given. |
| Method Detail |
public boolean canHandle(java.lang.Object context,
java.lang.Throwable e)
true, if this ErrorContextHandler can handle the
given context and Throwable.
context - the context given by the caller (may be null)e - the Throwable to handle (not null)
true iff can handle exception using
handleError(Object, Throwable)
public void handleError(java.lang.Object context,
java.lang.Throwable e)
throws java.lang.Throwable
ErrorHandler),
that this method is only called when canHandle(Object, Throwable)
with the same arguments has returned true.
context - the context given by the caller (may be null)e - the Throwable to handle (not null)
java.lang.Throwable - an exception that can be handled by a previously
added ErrorContextHandler (see ErrorHandler).
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||