use thiserror::Error; #[derive(Error, Debug)] pub enum WsgError { /// Error from the windowing system (winit) #[error("Window system error (winit)")] WindowSystem, /// No suitable graphics adapter found #[error("No graphics adapter found")] NoAdapter, /// Failed to create a WGPU device #[error("Failed to create WGPU device")] DeviceCreation, /// Shader compilation or creation error #[error("Shader compilation or creation error: {0}")] ShaderError(String), /// Internal WGPU error #[error("Internal WGPU error: {0}")] InternalWgpu(#[from] wgpu::RequestDeviceError), /// Failed to create the rendering surface #[error("Failed to create rendering surface")] SurfaceCreation(wgpu::CreateSurfaceError), }