1
use easygpu::wgpu::BufferAsyncError;
2
use easygpu_lyon::lyon_tessellation::TessellationError;
3

            
4
/// All errors that `kludgine-core` can return.
5
#[derive(thiserror::Error, Debug)]
6
pub enum Error {
7
    /// An error opening an image.
8
    #[error("error reading image: {0}")]
9
    Image(#[from] image::ImageError),
10
    /// An error parsing Json.
11
    #[error("error parsing json: {0}")]
12
    Json(#[from] json::Error),
13
    /// An error while rendering shapes.
14
    #[error("error tessellating shape")]
15
    Tessellation(TessellationError),
16
    /// An error while parsing sprite data.
17
    #[error("error parsing sprite data: {0}")]
18
    SpriteParse(String),
19
    /// The sprite's current tag has no frames.
20
    #[error("no frames could be found for the current tag")]
21
    InvalidSpriteTag,
22
    /// An error occurred during offscreen rendering.
23
    #[error("error acquiring offscreen buffer: {0}")]
24
    Offscreen(#[from] BufferAsyncError),
25
}