Class CamelExchangeException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CamelAuthorizationException, CamelUnitOfWorkException, ExchangeTimedOutException, InvalidPayloadException, NoSuchHeaderException, NoSuchHeaderOrPropertyException, NoSuchPropertyException, RollbackExchangeException, ValidationException

public class CamelExchangeException extends CamelException
An exception caused by a specific message Exchange
See Also:
  • Constructor Details

    • CamelExchangeException

      public CamelExchangeException(String message, Exchange exchange)
    • CamelExchangeException

      public CamelExchangeException(String message, Exchange exchange, Throwable cause)
  • Method Details

    • getExchange

      public Exchange getExchange()
      Returns the exchange which caused the exception
    • createExceptionMessage

      public static String createExceptionMessage(String message, Exchange exchange, Throwable cause)
      Creates an exception message with the provided details.

      All fields is optional so you can pass in only an exception, or just a message etc. or any combination.

      Parameters:
      message - the message
      exchange - the exchange
      cause - the caused exception
      Returns:
      an error message (without stacktrace from exception)