Skip to main content

to_trans/
errors.rs

1use thiserror;
2
3pub type Result<T> = std::result::Result<T, Error>;
4
5#[derive(thiserror::Error, Debug, PartialEq)]
6pub enum Error {
7    #[error("Error accessing transcript attribute in: {0}")]
8    AttributeError(String),
9
10    #[error("Error parsing attribute: {0}")]
11    ParseAttributeError(String),
12}
13
14impl From<std::io::Error> for Error {
15    fn from(error: std::io::Error) -> Self {
16        Error::AttributeError(error.to_string())
17    }
18}