public class ExceptionHandler
extends java.lang.Object
Constructor and Description |
---|
ExceptionHandler() |
Modifier and Type | Method and Description |
---|---|
static void |
debugException(Logger logger,
java.lang.String level,
java.lang.String methodName,
java.lang.String message,
java.lang.Throwable error)
Write the exception to the debug channels if the logger allows debugging
at the specified level.
|
static java.lang.Exception |
handleException(Logger logger,
java.lang.String level,
java.lang.String methodName,
java.lang.String message,
java.lang.Throwable error)
Handle the exception depending on its type and log an error message.
|
public static java.lang.Exception handleException(Logger logger, java.lang.String level, java.lang.String methodName, java.lang.String message, java.lang.Throwable error)
logger
- the logger.level
- the error level.methodName
- the name of the method in the class throwing the exception.message
- an additional message to output as well as the error.error
- the exception to process.public static void debugException(Logger logger, java.lang.String level, java.lang.String methodName, java.lang.String message, java.lang.Throwable error)
logger
- the logger.level
- the error level.methodName
- the name of the method in the class throwing the exception.message
- an additional message to output as well as the error.error
- the exception to process.