Expand description
Error handling for dynamic-cli
This module provides a hierarchical error system with clear and contextual messages to facilitate debugging.
§Error Types
DynamicCliError: Main error encompassing all categoriesConfigError: Configuration errorsParseError: Parsing errorsValidationError: Validation errorsExecutionError: Execution errorsRegistryError: Registry errors
§Example
use dynamic_cli::error::{DynamicCliError, ConfigError};
fn load_config() -> Result<(), DynamicCliError> {
Err(ConfigError::FileNotFound {
path: "config.yaml".into(),
}.into())
}Enums§
- Config
Error - Errors related to loading and parsing the configuration file
- Dynamic
CliError - Main error for the dynamic-cli framework
- Execution
Error - Errors during command execution
- Parse
Error - Errors when parsing user commands
- Registry
Error - Errors related to the command registry
- Validation
Error - Errors during argument validation
Functions§
- display_
error - Display an error in a user-friendly way to the terminal
- find_
similar_ strings - Find similar strings for suggestions
- format_
error - Format an error with coloring
Type Aliases§
- Result
- Specialized Result type for dynamic-cli