public class LoggingExceptionHandler extends Object implements ExceptionHandler
ExceptionHandler
which uses a CamelLogger
to
log the exception.
This implementation will by default log the exception with stack trace at WARN level.Constructor and Description |
---|
LoggingExceptionHandler(CamelLogger logger) |
LoggingExceptionHandler(Class<?> ownerType) |
LoggingExceptionHandler(Class<?> ownerType,
LoggingLevel level) |
Modifier and Type | Method and Description |
---|---|
void |
handleException(String message,
Exchange exchange,
Throwable exception)
Handles the given exception
|
void |
handleException(String message,
Throwable exception)
Handles the given exception
|
void |
handleException(Throwable exception)
Handles the given exception
|
protected boolean |
isCausedByRollbackExchangeException(Throwable exception) |
public LoggingExceptionHandler(Class<?> ownerType)
public LoggingExceptionHandler(Class<?> ownerType, LoggingLevel level)
public LoggingExceptionHandler(CamelLogger logger)
public void handleException(Throwable exception)
ExceptionHandler
handleException
in interface ExceptionHandler
exception
- the exceptionpublic void handleException(String message, Throwable exception)
ExceptionHandler
handleException
in interface ExceptionHandler
message
- additional messageexception
- the exceptionpublic void handleException(String message, Exchange exchange, Throwable exception)
ExceptionHandler
handleException
in interface ExceptionHandler
message
- additional messageexchange
- exchange which cause the exceptionexception
- the exceptionprotected boolean isCausedByRollbackExchangeException(Throwable exception)
Apache Camel