display_error

Function display_error 

Source
pub fn display_error(error: &DynamicCliError)
Expand description

Display an error in a user-friendly way to the terminal

This function displays the error on stderr with coloring and suggestions if available.

ยงExample

use dynamic_cli::error::{display_error, ParseError};

let error = ParseError::UnknownCommand {
    command: "simulat".to_string(),
    suggestions: vec!["simulate".to_string()],
};
display_error(&error.into());