Class FailedToCreateRouteException

All Implemented Interfaces:
Serializable

public class FailedToCreateRouteException extends RuntimeCamelException
Thrown when Camel cannot build a Route from a RoutesBuilder or route model, for example because an Endpoint cannot be resolved, a referenced bean or processor is missing, or DSL validation fails.

Distinct from FailedToStartRouteException, which signals that a successfully built route failed during the start phase of the CamelContext lifecycle.

See Also:
  • Constructor Details

    • FailedToCreateRouteException

      public FailedToCreateRouteException(String cause)
      Parameters:
      cause - a description of why route creation failed
    • FailedToCreateRouteException

      public FailedToCreateRouteException(String routeId, @Nullable String location, String route, String cause)
      Parameters:
      routeId - the ID of the route that failed to be created
      location - the source location of the route definition, or null if unknown
      route - the route definition string
      cause - the error message describing why route creation failed
    • FailedToCreateRouteException

      public FailedToCreateRouteException(String routeId, @Nullable String location, String route, Throwable cause)
      Parameters:
      routeId - the ID of the route that failed to be created
      location - the source location of the route definition, or null if unknown
      route - the route definition string
      cause - the cause of the failure
    • FailedToCreateRouteException

      public FailedToCreateRouteException(String routeId, @Nullable String location, String route, String at, Throwable cause)
      Parameters:
      routeId - the ID of the route that failed to be created
      location - the source location of the route definition, or null if unknown
      route - the route definition string
      at - the location in the route definition where the error occurred
      cause - the cause of the failure
  • Method Details

    • getRouteId

      public @Nullable String getRouteId()
    • getLocation

      public @Nullable String getLocation()
    • getExceptionMessage

      protected static String getExceptionMessage(Throwable cause)
    • getRouteMessage

      protected static String getRouteMessage(String route)