Expand description
Core error types for ASS-RS utilities and cross-module error handling
Provides the main CoreError enum that wraps all error types from different
modules in the crate. Designed for easy error propagation and conversion.
§Error Philosophy
- Use
thiserrorfor structured error handling (noanyhowbloat) - Provide detailed context for debugging and user feedback
- Support error chains with source information
- Include suggestions for common error scenarios
- Maintain zero-cost error handling where possible
§Examples
use ass_core::utils::errors::{CoreError, Result, ErrorCategory};
// Create specific error types
let color_err = CoreError::invalid_color("invalid");
let time_err = CoreError::invalid_time("1:23", "missing seconds");
// Check error properties
assert_eq!(color_err.category(), ErrorCategory::Format);
assert!(color_err.suggestion().is_some());Re-exports§
pub use encoding::utf8_error;pub use encoding::validate_ass_text_content;pub use encoding::validate_bom_handling;pub use encoding::validate_utf8_detailed;pub use resource::check_memory_limit;pub use resource::feature_not_supported;pub use resource::out_of_memory;pub use resource::resource_limit_exceeded;
Modules§
- encoding
- Text encoding error utilities for ASS-RS
- resource
- Resource management error utilities for ASS-RS
Enums§
- Core
Error - Main error type for ASS-RS core operations
- Error
Category - Error category for filtering and user interface organization
Functions§
- invalid_
color - Create color format error with detailed context
- invalid_
numeric - Create numeric parsing error with value and reason
- invalid_
time - Create time format error with time and reason
- validate_
color_ format - Validate ASS color format
Type Aliases§
- Result
- Result type alias for convenience