wasm_ast/leb128/
errors.rs

1/// An error in LEB128 encoding or decoding.
2#[derive(thiserror::Error, Debug)]
3pub enum LEB128Error {
4    #[error("The given integer type does not have sufficient capacity to store the parsed integer without overflow.")]
5    Conversion(#[from] std::num::TryFromIntError),
6    #[error("The parsed integer requires {0} bytes to be stored without overflow, but only {1} are available.")]
7    Overflow(usize, usize),
8    #[error("The given input does not contain a valid LEB128-encoded integer.")]
9    Invalid,
10    #[error("Failed to write to the given output.")]
11    WriteFailure(#[from] std::io::Error),
12}