Skip to main content

emit_error

Function emit_error 

Source
pub fn emit_error(
    message: &str,
    exit_code: u8,
    output: OutputFormat,
) -> ExitCode
Expand description

Emit an error as structured JSON on stdout when --format json is active, then return the given exit code. For non-JSON formats, emit to stderr as usual.