use std::io::Error as IoError;
use thiserror::Error as ThisError;
#[derive(Debug, ThisError)]
pub enum PtvError {
#[error("unsupported ptvoice format")]
Unsupported,
#[error("invalid ptvoice data")]
Invalid,
#[error("ptvoice data exceeds max size")]
Oversized,
#[error("ptvoice I/O failure: {0}")]
IoFailure(IoError),
}
impl From<IoError> for PtvError {
fn from(value: IoError) -> Self {
Self::IoFailure(value)
}
}