pub enum InitError {
EnvParseFailed,
DomainIdOutOfRange,
RetiredEnvVar {
name: &'static str,
replacement: &'static str,
},
ExecutorOpenFailed(NodeError),
BackingTooSmall {
needed: usize,
given: usize,
},
}Expand description
Errors returned by the init API.
Variants§
EnvParseFailed
A launch-derived env var (ROS_DOMAIN_ID, etc.) failed to parse —
or, freestanding, the baked NROS_DOMAIN_ID is not a decimal integer.
DomainIdOutOfRange
A domain id — from the environment, the bake, or an
InitOptions::with_domain_id override — exceeds
crate::DOMAIN_ID_MAX. Rejected here rather than
handed to a backend that can only fail later (the #206 rule).
RetiredEnvVar
phase-484 W8c — a RETIRED environment variable is set (ZENOH_LOCATOR,
ZENOH_MODE). Refused rather than ignored: an ignored locator dials
the default router, which reads as “no delivery”.
Fields
ExecutorOpenFailed(NodeError)
phase-427 W10 — Context::create_executor /
Context::create_executor_in resolved the identity and the RMW
session open then failed.
The backend’s own NodeError is CARRIED, not flattened into a flag:
Transport(InvalidConfig) (no backend registered, or more than one and
no selector) and Transport(ConnectionFailed) (the router is not there)
are different problems with different fixes, and issue 0465 is what
collapsing them cost the last time.
BackingTooSmall
phase-427 W10 — Context::create_executor_in was handed a backing
smaller than the executor’s tables need.
Refused rather than accepted: Executor::open_in is unsafe precisely
because a short backing is undefined behaviour, so the safe wrapper
checks the length and names both numbers. needed is
ExecutorSizing::DEFAULT.u64_len() for this build — it moves with
NROS_EXECUTOR_MAX_CBS / _MAX_SC / _ARENA_SIZE / _MAX_NODES, so a
caller sizing a static from a literal will hear about it here rather
than corrupting memory later.
Trait Implementations§
impl Eq for InitError
Source§impl Error for InitError
impl Error for InitError
1.30.0 · 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()