public class ThreadLocalisedExceptionHandler extends Object implements ExceptionHandler
| Constructor and Description |
|---|
ThreadLocalisedExceptionHandler(Slf4jExceptionHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
ExceptionHandler |
defaultHandler() |
ThreadLocalisedExceptionHandler |
defaultHandler(ExceptionHandler defaultHandler) |
boolean |
isEnabled(@NotNull Class<?> aClass) |
void |
on(@NotNull Class<?> clazz,
@Nullable 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, waiton, onpublic ThreadLocalisedExceptionHandler(Slf4jExceptionHandler handler)
public void on(@NotNull
@NotNull Class<?> clazz,
@Nullable
@Nullable String message,
Throwable thrown)
ExceptionHandleron in interface ExceptionHandlerclazz - the error is associated with, e.g. the one in which it was caught (non-null)message - any message associated with the error, or an empty Stringthrown - 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(@NotNull
@NotNull Class<?> aClass)
isEnabled in interface ExceptionHandlerCopyright © 2022. All rights reserved.