Expand description
Error types and result aliases.
Defines ScopeError for all error conditions and provides a
convenient Result type alias.
§Error Handling Module
This module defines the error types used throughout the Scope application.
It provides a unified error type ScopeError that wraps all possible
error conditions, along with a convenient Result type alias.
§Error Hierarchy
ScopeError
├── Config - Configuration loading/parsing errors
├── Chain - Blockchain client errors
├── Request - HTTP/API request failures
├── InvalidAddress - Malformed blockchain address
├── InvalidHash - Malformed transaction hash
├── Io - File system operations
└── Export - Data export failures§Usage
use scope::{ScopeError, Result};
fn validate_address(addr: &str) -> Result<()> {
if !addr.starts_with("0x") || addr.len() != 42 {
return Err(ScopeError::InvalidAddress(addr.to_string()));
}
Ok(())
}Enums§
- Config
Error - Configuration-specific error type.
- Scope
Error - The primary error type for the Scope application.