1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
use thiserror::Error;

#[derive(Debug, Error)]
pub enum SicCoreError {
    #[error("{0}")]
    ImageError(image::error::ImageError),

    #[error("Invalid frame index: index (is {index}) should be < len (is {len}) ")]
    InvalidFrameIndex { index: usize, len: usize },

    #[error("A static image was required, but an animated image was given")]
    RequiresStaticImage,
}