1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use thiserror::Error;

#[derive(Error, Debug)]
pub enum Error {
    #[error("failed to open the ZIP-archive")]
    OpenArchiveFailed(#[source] zip::result::ZipError),

    #[error("failed to open the battle results entry in the replay archive")]
    OpenBattleResultsFailed(#[source] zip::result::ZipError),

    #[error("failed to read the archive entry")]
    ReadEntryFailed(#[source] std::io::Error),

    #[error("failed to decode")]
    DecodeFailed(#[source] prost::DecodeError),

    #[error("failed to un-pickle")]
    UnpickleFailed(#[source] serde_pickle::Error),
}