Skip to main content

Module error

Module error 

Source
Expand description

Error handling for dynamic-cli

This module provides a hierarchical error system with clear and contextual messages to facilitate debugging.

§Error Types

§Example

use dynamic_cli::error::{DynamicCliError, ConfigError};

fn load_config() -> Result<(), DynamicCliError> {
    Err(ConfigError::FileNotFound {
        path: "config.yaml".into(),
        suggestion: None,
    }.into())
}

Enums§

ConfigError
Errors related to loading and parsing the configuration file
DynamicCliError
Main error for the dynamic-cli framework
ExecutionError
Errors during command execution
ParseError
Errors when parsing user commands
RegistryError
Errors related to the command registry
ValidationError
Errors during argument validation
WasmError
Errors related to loading and executing WASM plugins

Functions§

display_error
Print an error to stderr in a user-friendly way
find_similar_strings
Find similar strings for suggestions
format_error
Format an error as a colored, human-readable string

Type Aliases§

Result
Specialized Result type for dynamic-cli