2020-02-11 10:01:39 +02:00
|
|
|
use thiserror::Error;
|
|
|
|
|
|
|
|
#[derive(Error, Debug)]
|
|
|
|
pub enum ReaderError {
|
|
|
|
#[error("Failed to read from zip.")]
|
|
|
|
ZipError(#[from] zip::result::ZipError),
|
|
|
|
#[error("Failed to parse int.")]
|
|
|
|
NumError(#[from] std::num::ParseIntError),
|
|
|
|
#[error("Failed to convert type.")]
|
|
|
|
TypeError(#[from] crate::types::TypeError),
|
|
|
|
#[error("Failed to read xml.")]
|
|
|
|
XMLReadError,
|
|
|
|
#[error("Failed to find document.")]
|
|
|
|
DocumentNotFoundError,
|
2020-02-12 09:03:11 +02:00
|
|
|
#[error("Failed to find document rels.")]
|
|
|
|
DocumentRelsNotFoundError,
|
|
|
|
#[error("Failed to find styles.")]
|
|
|
|
DocumentStylesNotFoundError,
|
2020-02-12 19:57:48 +02:00
|
|
|
#[error("Failed to find numberings.")]
|
|
|
|
DocumentNumberingsNotFoundError,
|
2020-02-11 10:01:39 +02:00
|
|
|
#[error("Unknown error")]
|
|
|
|
Unknown,
|
|
|
|
}
|