mirror of
https://github.com/bevyengine/bevy
synced 2024-11-23 05:03:47 +00:00
dea292d199
# Objective - Make it easy to use HexColorError with `thiserror`, i.e. converting it into other error types. Makes this possible: ```rust #[derive(Debug, thiserror::Error)] pub enum LdtkError { #[error("An error occured while deserializing")] Json(#[from] serde_json::Error), #[error("An error occured while parsing a color")] HexColor(#[from] bevy::render::color::HexColorError), } ``` ## Solution - Derive thiserror::Error the same way we do elsewhere (see query.rs for instance) |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |