diff options
author | metamuffin <metamuffin@disroot.org> | 2023-08-05 11:51:26 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-08-05 11:51:26 +0200 |
commit | 7cba183debcf2cefd90b4c1e7a630fb0c2152d06 (patch) | |
tree | 4d662af700078a2b53df08371f31bba0ccd1a216 /matroska/src/error.rs | |
parent | 4a0f08126d80dc589e3c97bf0a07571b8b828a74 (diff) | |
download | jellything-7cba183debcf2cefd90b4c1e7a630fb0c2152d06.tar jellything-7cba183debcf2cefd90b4c1e7a630fb0c2152d06.tar.bz2 jellything-7cba183debcf2cefd90b4c1e7a630fb0c2152d06.tar.zst |
(semi-)proper error handling in matroska
Diffstat (limited to 'matroska/src/error.rs')
-rw-r--r-- | matroska/src/error.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/matroska/src/error.rs b/matroska/src/error.rs new file mode 100644 index 0000000..02e487d --- /dev/null +++ b/matroska/src/error.rs @@ -0,0 +1,19 @@ +use thiserror::Error; + +#[derive(Debug, Error)] +pub enum Error { + #[error("invalid padding")] + InvalidPadding, + #[error("varint too long")] + VarintTooLong, + #[error("global tags dont provide any context")] + GlobalTagsAsContext, + #[error("invalid length of a exact size type")] + InvalidTypeLen, + #[error("invalid utf8")] + InvalidUTF8, + #[error("unknown id")] + UnknownID, + #[error("io: {0}")] + Io(std::io::Error), +} |