Skip to main content

emit_coded_error

Function emit_coded_error 

Source
pub fn emit_coded_error(
    code: &str,
    msg: &str,
    hint: Option<&str>,
    format: OutputFormat,
) -> Result<(), CliEmitterError>
Expand description

Emit one error event under a caller-chosen classification.

Structural rejections carry the parser’s own cli_* code, so an agent branches on error.code for those exactly as it does for domain failures.