use llvm_bitstream::error::Error as BitstreamError;
use thiserror::Error as ThisError;
use crate::block::BlockMapError;
#[non_exhaustive]
#[derive(Debug, ThisError)]
pub enum Error {
#[error("error while parsing the bitstream: {0}")]
Parse(#[from] BitstreamError),
#[error("error while unrolling the bitstream: {0}")]
BadUnroll(String),
#[error("error while mapping block: {0}")]
BadBlock(#[from] BlockMapError),
}