Skip to main content

format_error_json

Function format_error_json 

Source
pub fn format_error_json(message: &str, kind: &str) -> String
Expand description

Format a structured error as the clispec v0.2 envelope.

The spec requires the last line of stderr to be: {"error": {"kind": "<kind>", "message": "<message>"}}