niffler_temp/
error.rs

1use thiserror::Error;
2
3/// Errors that can be generated by niffler
4#[allow(clippy::upper_case_acronyms)]
5#[derive(Debug, Error)]
6pub enum Error {
7    /// This feature is disabled, you can enable it in cargo dependencies sections.
8    #[error("Feature disabled, enabled it during compilation")]
9    FeatureDisabled,
10
11    /// This file is shorter than five bytes, it's probably not a compression file or corrupted.
12    #[error("File is too short, less than five bytes")]
13    FileTooShort,
14
15    #[error("I/O error")]
16    IOError(#[from] std::io::Error),
17}