use thiserror::Error;
#[derive(Error, Debug)]
pub enum TextureError {
#[error("The layer you set for this object does not exist:\n{0}")]
Layer(String),
#[error(
"The object you ran a function on that requires a textured material does not have one."
)]
NoTexture,
#[error("The given format does not match with the bytes provided:\n{0}")]
InvalidFormat(String),
#[error("There was an error loading this texture:\n{0}")]
Other(anyhow::Error),
}