org.apache.camel.impl
Class LoggingExceptionHandler

java.lang.Object
  extended by org.apache.camel.impl.LoggingExceptionHandler
All Implemented Interfaces:
ExceptionHandler

public class LoggingExceptionHandler
extends Object
implements ExceptionHandler

A default implementation of ExceptionHandler which uses a CamelLogger to log the exception.

This implementation will by default log the exception with stack trace at WARN level.

Version:

Constructor Summary
LoggingExceptionHandler(CamelLogger logger)
           
LoggingExceptionHandler(Class<?> ownerType)
           
LoggingExceptionHandler(Class<?> ownerType, LoggingLevel level)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingExceptionHandler

public LoggingExceptionHandler(Class<?> ownerType)

LoggingExceptionHandler

public LoggingExceptionHandler(Class<?> ownerType,
                               LoggingLevel level)

LoggingExceptionHandler

public LoggingExceptionHandler(CamelLogger logger)
Method Detail

handleException

public void handleException(Throwable exception)
Description copied from interface: ExceptionHandler
Handles the given exception

Specified by:
handleException in interface ExceptionHandler
Parameters:
exception - the exception

handleException

public void handleException(String message,
                            Throwable exception)
Description copied from interface: ExceptionHandler
Handles the given exception

Specified by:
handleException in interface ExceptionHandler
Parameters:
message - additional message
exception - the exception

handleException

public void handleException(String message,
                            Exchange exchange,
                            Throwable exception)
Description copied from interface: ExceptionHandler
Handles the given exception

Specified by:
handleException in interface ExceptionHandler
Parameters:
message - additional message
exchange - exchange which cause the exception
exception - the exception

isCausedByRollbackExchangeException

protected boolean isCausedByRollbackExchangeException(Throwable exception)


Apache CAMEL