use std::sync::Arc;
use thiserror::Error as ThisError;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(ThisError, Debug)]
pub enum Error {
#[error("io error")]
Io(#[from] std::io::Error),
#[error("template error")]
Template(#[from] tera::Error),
#[error("error running ngspice")]
NgspiceError,
#[error("error parsing output rawfile")]
RawfileParse(#[from] nutlex::error::Error),
#[error("error generating ngspice results")]
Generator(#[from] Arc<Error>),
#[error("error generating ngspice results")]
Caching(#[from] Arc<cache::error::Error>),
}