Skip to main content

xz_rs/decode/
error.rs

1use crate::block::BlockDecodeError;
2use crate::stream::StreamDecodeError;
3
4use thiserror::Error;
5
6#[derive(Error, Debug)]
7pub enum DecodeError {
8    #[error("Invalid stream: {0}")]
9    StreamError(#[from] StreamDecodeError),
10
11    #[error("Invalid block: {0}")]
12    BlockError(#[from] BlockDecodeError),
13
14    #[error("Error reading data: {0}")]
15    ReadError(#[from] std::io::Error),
16
17    #[error("VLI overflow")]
18    VliOverflowError,
19}