Class RuntimeExchangeException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CamelExecutionException, InvalidPayloadRuntimeException

public class RuntimeExchangeException extends RuntimeCamelException
Unchecked base exception carrying the Exchange whose processing triggered the failure.

This is the unchecked counterpart of CamelExchangeException and is the base for exceptions such as InvalidPayloadRuntimeException that are thrown in contexts where a checked exception is not permitted.

See Also:
  • Constructor Details

    • RuntimeExchangeException

      public RuntimeExchangeException(String message, @Nullable Exchange exchange)
      Parameters:
      message - the detail message
      exchange - the exchange that caused the error
    • RuntimeExchangeException

      public RuntimeExchangeException(String message, @Nullable Exchange exchange, Throwable cause)
      Parameters:
      message - the detail message
      exchange - the exchange that caused the error
      cause - the cause of the failure
  • Method Details

    • getExchange

      public @Nullable Exchange getExchange()
      Returns the exchange which caused the exception

      Can be null

    • createMessage

      protected static String createMessage(String message, @Nullable Exchange exchange)