#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum StyleError {
#[error("style error: {0}")]
Native(String),
#[cfg(feature = "json")]
#[error("invalid JSON: {0}")]
Json(#[from] serde_json::Error),
#[cfg(feature = "json")]
#[error("invalid JSON number: {0}")]
JsonNumber(String),
}
impl From<cxx::Exception> for StyleError {
fn from(value: cxx::Exception) -> Self {
Self::Native(value.to_string())
}
}