use thiserror::Error;
use wgpu::RequestAdapterError;
use wgpu::RequestDeviceError;
use winit::error::EventLoopError;
pub type AleaticoResult<T> = Result<T, AleaticoError>;
#[derive(Error, Debug)]
pub enum AleaticoError {
#[error(transparent)]
EventLoopError(#[from] EventLoopError),
#[error("the surface has been lost and needs to be recreated")]
LostDevice,
#[error(transparent)]
RequestAdapterError(#[from] RequestAdapterError),
#[error(transparent)]
RequestDeviceError(#[from] RequestDeviceError),
#[error(transparent)]
IoError(#[from] std::io::Error),
}