Class NoSuchHeaderOrPropertyException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.camel.CamelException
org.apache.camel.CamelExchangeException
org.apache.camel.NoSuchHeaderOrPropertyException
- All Implemented Interfaces:
Serializable
Thrown when neither a mandatory header nor a mandatory exchange property is available on an
Exchange, and at
least one of them is required for processing to continue.
Combines the roles of NoSuchHeaderException and NoSuchPropertyException for callers that accept
either source but need at least one to be present.- Since:
- 3.18
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNoSuchHeaderOrPropertyException(Exchange exchange, String headerName, String propertyName, Class<?> type) -
Method Summary
Methods inherited from class CamelExchangeException
createExceptionMessage, getExchangeMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NoSuchHeaderOrPropertyException
public NoSuchHeaderOrPropertyException(Exchange exchange, String headerName, String propertyName, Class<?> type) - Parameters:
exchange- the exchange that caused the errorheaderName- the name of the header that could not be foundpropertyName- the name of the property that could not be foundtype- the expected type of the header or property
-
-
Method Details
-
getHeaderName
-
getPropertyName
-
getType
-
header
-
property
-