Skip to main content

Module exit_code

Module exit_code 

Source
Expand description

Process exit-code attachment.

RTB exits 1 on any error by default. When a command needs a specific process exit code, attach it to the error with WithExitCode; the application boundary reads it back once with exit_code_of and exits accordingly. This is a value attached to an error — not an ErrorHandler/.check() funnel. Errors stay values, propagated with ? and reported once at the edge.

See docs/development/specs/2026-06-26-rtb-error-exit-code-attachment.md.

Structs§

ExitCoded
A diagnostic with an attached process exit code.

Traits§

WithExitCode
Attach a process exit code to a diagnostic.

Functions§

exit_code_of
Read an exit code attached to report, if any.