use thiserror;
pub type Result<T> = std::result::Result<T, Error>;
#[non_exhaustive]
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("i/o error: {0}")]
IO(#[from] std::io::Error),
#[error("{0}")]
Format(String),
#[error("operation not supported: {0}")]
OpNotSupp(String),
#[error("no type with id {0}")]
InvalidType(u32),
#[error("no string at offset {0}")]
InvalidString(u32),
}