org.apache.camel
Class CamelExchangeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.camel.CamelException
org.apache.camel.CamelExchangeException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AmbiguousMethodCallException, CamelAuthorizationException, CamelUnitOfWorkException, ClosedCorrelationKeyException, DirectConsumerNotAvailableException, ExchangeTimedOutException, InvalidPayloadException, MethodNotFoundException, NoSuchHeaderException, NoSuchPropertyException, RollbackExchangeException, ValidationException
public class CamelExchangeException
- extends CamelException
An exception caused by a specific message Exchange
- Version:
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
CamelExchangeException
public CamelExchangeException(String message,
Exchange exchange)
CamelExchangeException
public CamelExchangeException(String message,
Exchange exchange,
Throwable cause)
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 messageexchange
- the exchangecause
- the caused exception
- Returns:
- an error message (without stacktrace from exception)
Apache CAMEL