aboutsummaryrefslogtreecommitdiff
path: root/matroska/src/error.rs
blob: e8f7c28f0175d7db3e4da8aa7f6a21465825cf7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
    This file is part of jellything (https://codeberg.org/metamuffin/jellything)
    which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
    Copyright (C) 2023 metamuffin <metamuffin.org>
*/
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),
}