aboutsummaryrefslogtreecommitdiff
path: root/azalea-nbt/src/error.rs
blob: ace7fcd30fa16bf21de591156f71f1c24c4dc2fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    #[error("Invalid tag type: {0}")]
    InvalidTagType(u8),
    #[error("Invalid tag")]
    InvalidTag,
    #[error("Write error: {0}")]
    WriteError(#[from] std::io::Error),
    #[error("Utf8 error: {0}")]
    Utf8Error(#[from] std::str::Utf8Error),
    #[error("Unexpected EOF")]
    UnexpectedEof,
}