public class ThreadLocalisedExceptionHandler extends Object implements ExceptionHandler
Constructor and Description |
---|
ThreadLocalisedExceptionHandler(ExceptionHandler handler) |
ThreadLocalisedExceptionHandler(Slf4jExceptionHandler handler)
Deprecated.
use
ThreadLocalisedExceptionHandler(ExceptionHandler) instead (to be removed in x.24) |
Modifier and Type | Method and Description |
---|---|
ExceptionHandler |
defaultHandler() |
ThreadLocalisedExceptionHandler |
defaultHandler(ExceptionHandler defaultHandler) |
boolean |
isEnabled(Class aClass) |
void |
on(Class clazz,
String message,
Throwable thrown)
A method to call when an exception occurs.
|
void |
resetThreadLocalHandler() |
ExceptionHandler |
threadLocalHandler() |
ThreadLocalisedExceptionHandler |
threadLocalHandler(ExceptionHandler handler) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
on, on
@Deprecated public ThreadLocalisedExceptionHandler(Slf4jExceptionHandler handler)
ThreadLocalisedExceptionHandler(ExceptionHandler)
instead (to be removed in x.24)public ThreadLocalisedExceptionHandler(ExceptionHandler handler)
public void on(Class clazz, String message, Throwable thrown)
ExceptionHandler
on
in interface ExceptionHandler
clazz
- the error is associated with, e.g. the one in which it was caughtmessage
- any message associated with the error, or empty String.thrown
- any Throwable caught, or null if there was no exception.public ExceptionHandler defaultHandler()
public ThreadLocalisedExceptionHandler defaultHandler(ExceptionHandler defaultHandler)
public ExceptionHandler threadLocalHandler()
public ThreadLocalisedExceptionHandler threadLocalHandler(ExceptionHandler handler)
public void resetThreadLocalHandler()
public boolean isEnabled(Class aClass)
isEnabled
in interface ExceptionHandler
Copyright © 2022. All rights reserved.