1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum PlatformError {
8 #[error("Platform initialization failed: {0}")]
10 InitFailed(String),
11
12 #[error("Failed to create event loop: {0}")]
14 EventLoop(String),
15
16 #[error("Failed to create window: {0}")]
18 WindowCreation(String),
19
20 #[error("Platform not available: {0}")]
22 Unavailable(String),
23
24 #[error("Platform not supported: {0}")]
26 Unsupported(String),
27
28 #[error("Platform error: {0}")]
30 Other(String),
31
32 #[error("Asset load failed: {0}")]
34 AssetLoad(String),
35}
36
37pub type Result<T> = std::result::Result<T, PlatformError>;