crispy_iptv_tools/error.rs
1//! Error types for IPTV tools operations.
2
3/// Errors that can occur during IPTV tools operations.
4#[derive(Debug, thiserror::Error)]
5pub enum ToolsError {
6 /// Invalid URL format.
7 #[error("invalid URL: {0}")]
8 InvalidUrl(String),
9
10 /// Invalid regex pattern.
11 #[error("invalid regex pattern: {0}")]
12 InvalidPattern(#[from] regex::Error),
13
14 /// Empty input where non-empty was expected.
15 #[error("empty input: {0}")]
16 EmptyInput(String),
17
18 /// Invalid configuration (e.g., malformed JSON).
19 #[error("invalid config: {0}")]
20 InvalidConfig(String),
21}