1use std::string::FromUtf8Error;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum FlacError {
6 #[error("invalid magic number")]
7 InvalidMagicNumber,
8 #[error("invalid first block, must be StreamInfo")]
9 InvalidFirstBlock,
10 #[error("invalid block type 0xff")]
11 InvalidBlockType,
12 #[error("invalid seek table size")]
13 InvalidSeekTableSize,
14 #[error("invalid picture type")]
15 InvalidPictureType,
16 #[error(transparent)]
17 InvalidString(#[from] FromUtf8Error),
18 #[error(transparent)]
19 IO(#[from] std::io::Error),
20 #[error(transparent)]
21 ImageError(#[from] image::ImageError),
22}