Skip to main content

bms_table/
error.rs

1//! Error types for BMS table parsing.
2
3use thiserror::Error;
4
5/// Errors that can occur during BMS table parsing.
6#[derive(Debug, Error)]
7#[non_exhaustive]
8pub enum BmsTableError {
9    /// The `<meta name="bmstable">` HTML tag was not found or its `content` attribute is empty.
10    #[error("bmstable meta tag not found in HTML")]
11    MetaTagNotFound,
12    /// A JSON deserialization error.
13    #[error("JSON error: {0}")]
14    Json(#[from] serde_json::Error),
15    /// An HTML tokenizer error (from `htmlparser`).
16    #[error("HTML tokenizer error: {0}")]
17    TokenizerError(String),
18}