Class NoSuchPropertyException

All Implemented Interfaces:
Serializable

public class NoSuchPropertyException extends CamelExchangeException
Thrown when a mandatory exchange property is not available on an Exchange.

Typically raised by

invalid reference
org.apache.camel.support.ExchangeHelper#getMandatoryProperty(Exchange, String, Class)
when a processor or EIP requires a specific property to be present.
See Also:
  • Constructor Details

    • NoSuchPropertyException

      public NoSuchPropertyException(Exchange exchange, String propertyName)
      Parameters:
      exchange - the exchange that caused the error
      propertyName - the name of the missing exchange property
    • NoSuchPropertyException

      public NoSuchPropertyException(Exchange exchange, String propertyName, @Nullable Class<?> type)
      Parameters:
      exchange - the exchange that caused the error
      propertyName - the name of the missing exchange property
      type - the expected property type, or null if no specific type is required
  • Method Details

    • getPropertyName

      public String getPropertyName()
    • getType

      public @Nullable Class<?> getType()
    • reason

      protected static String reason(Exchange exchange, String propertyName)