Skip to main content

print_cli_error

Function print_cli_error 

Source
pub fn print_cli_error(
    code: &str,
    message: &str,
    _kind: ExitKind,
    json_mode: bool,
    details: Option<&Value>,
)
Expand description

Print a typed CLI error in the documented surface shape, routed per render_cli_error: the structured --json envelope to stdout, the human markdown form to stderr. The exit code (set by the caller from ExitKind) signals failure independently of the stream.