Class RuntimeCamelException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AlreadyStoppedException, ExpectedBodyTypeException, ExpressionEvaluationException, ExpressionIllegalSyntaxException, FailedToCreateConsumerException, FailedToCreateProducerException, FailedToCreateRouteException, FailedToCreateRouteFromTemplateException, FailedToStartComponentException, FailedToStartRouteException, InvalidPropertyException, NoSuchBeanException, NoSuchEndpointException, NoSuchLanguageException, NoSuchServiceException, PropertyBindingException, ProxyInstantiationException, ResolveEndpointFailedException, RuntimeExchangeException, RuntimeExpressionException, RuntimeTransformException, TypeConversionException, TypeConverterExistsException, TypeConverterLoaderException

public class RuntimeCamelException extends RuntimeException
Base class for all unchecked exceptions thrown by Camel itself.

Used by Camel when it cannot propagate a checked Exception through an API that does not declare one (for example inside a Processor chain). The static wrapRuntimeCamelException(Throwable) and wrapRuntimeException(Throwable) helpers preserve the original cause unchanged when it is already unchecked, so wrapping a Throwable from a unit of work is idempotent.

See Also:
  • Constructor Details

    • RuntimeCamelException

      public RuntimeCamelException()
    • RuntimeCamelException

      public RuntimeCamelException(@Nullable String message)
      Parameters:
      message - the detail message
    • RuntimeCamelException

      public RuntimeCamelException(@Nullable String message, @Nullable Throwable cause)
      Parameters:
      message - the detail message
      cause - the cause of the failure
    • RuntimeCamelException

      public RuntimeCamelException(@Nullable Throwable cause)
      Parameters:
      cause - the cause of the failure
  • Method Details

    • wrapRuntimeCamelException

      public static RuntimeCamelException wrapRuntimeCamelException(Throwable e)
      Wraps the caused exception in a RuntimeCamelException if its not already such an exception.
      Parameters:
      e - the caused exception
      Returns:
      the wrapper exception
    • wrapRuntimeException

      public static RuntimeException wrapRuntimeException(Throwable e)
      Wraps the caused exception in a RuntimeCamelException if its not already a runtime exception.
      Parameters:
      e - the caused exception
      Returns:
      the wrapper exception