#[non_exhaustive]pub enum CamelError {
Show 19 variants
ComponentNotFound(String),
EndpointCreationFailed(String),
ProcessorError(String),
ProcessorErrorWithSource(String, Arc<dyn Error + Sync + Send>),
TypeConversionFailed(String),
InvalidUri(String),
ChannelClosed,
RouteError(String),
Io(String),
DeadLetterChannelFailed(String),
CircuitOpen(String),
HttpOperationFailed {
method: String,
url: String,
status_code: u16,
status_text: String,
response_body: Option<String>,
},
Stopped,
ConsumerStopping,
Config(String),
AlreadyConsumed,
StreamLimitExceeded(usize),
Unauthenticated(String),
Unauthorized(String),
}Expand description
Core error type for the Camel framework.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ComponentNotFound(String)
EndpointCreationFailed(String)
ProcessorError(String)
ProcessorErrorWithSource(String, Arc<dyn Error + Sync + Send>)
Like ProcessorError but preserves the source error chain
for downstream inspection (e.g. via std::error::Error::source()).
TypeConversionFailed(String)
InvalidUri(String)
ChannelClosed
RouteError(String)
Io(String)
DeadLetterChannelFailed(String)
CircuitOpen(String)
HttpOperationFailed
Fields
Stopped
ConsumerStopping
Producer’s poll_ready returned a shutdown signal — the consumer/semaphore
is closing and the producer cannot acquire a permit. Distinct from Stop EIP
(which is successful control flow). Used by JMS/OpenSearch producers. See ADR-0024.
Config(String)
AlreadyConsumed
StreamLimitExceeded(usize)
Unauthenticated(String)
Implementations§
Source§impl CamelError
impl CamelError
pub fn classify(&self) -> &'static str
Sourcepub fn variant_name(&self) -> &'static str
pub fn variant_name(&self) -> &'static str
Stable variant name used by doTry catch-by-variant matchers.
ProcessorErrorWithSource aliases to "ProcessorError" — the two variants are
not distinguishable by name in MVP (see spec §5.4).
The enum is #[non_exhaustive]; this match lives in the defining crate (camel-api),
so internal exhaustive matching is allowed. Adding a new variant without updating
this method will fail to compile, surfaced by variant_name_tests.
Trait Implementations§
Source§impl Clone for CamelError
impl Clone for CamelError
Source§fn clone(&self) -> CamelError
fn clone(&self) -> CamelError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CamelError
impl Debug for CamelError
Source§impl Display for CamelError
impl Display for CamelError
Source§impl Error for CamelError
impl Error for CamelError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()