Skip to main content

report_cli_failure_and_exit

Function report_cli_failure_and_exit 

Source
pub fn report_cli_failure_and_exit(ctx: &str, e: &CamelError) -> !
Expand description

Report a fatal CLI subcommand failure: print to stderr and exit(1).

Category (d) per ADR-0012 — the caller’s error! invocation MUST be preceded by // log-policy: system-broken. This helper exists to deduplicate the eprintln! + std::process::exit(1) pattern, NOT to replace the error! log (which is the ADR-mandated operator signal).

Use when the failure is a CLI-bootstrap problem (config read, route discovery, context start) that should terminate the process with exit code 1.