Package 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:
CamelAuthorizationException
,CamelUnitOfWorkException
,ExchangeTimedOutException
,InvalidPayloadException
,NoSuchHeaderException
,NoSuchHeaderOrPropertyException
,NoSuchPropertyException
,RollbackExchangeException
,ValidationException
An exception caused by a specific message
Exchange
- See Also:
-
Constructor Summary
ConstructorDescriptionCamelExchangeException
(String message, Exchange exchange) CamelExchangeException
(String message, Exchange exchange, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
createExceptionMessage
(String message, Exchange exchange, Throwable cause) Creates an exception message with the provided details.Returns the exchange which caused the exceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CamelExchangeException
-
CamelExchangeException
-
-
Method Details
-
getExchange
Returns the exchange which caused the exception -
createExceptionMessage
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)
-