bbecs_tutorial/
custom_errors.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum CustomErrors {
5 #[error("Attempting to add component to an entity without calling create component first")]
6 CreateComponentNeverCalled,
7 #[error("attempting to reference a component that wasn't registered")]
8 ComponentNotRegistered,
9 #[error("attempting to reference an entity that doesn't exist")]
10 EntityDoesNotExist,
11 #[error("attempting to get component data that does not exist")]
12 ComponentDataDoesNotExist,
13 #[error("attempting to downcast to the wrong type")]
14 DowncastToWrongType,
15}