forked from processing/libprocessing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.rs
More file actions
23 lines (21 loc) · 729 Bytes
/
error.rs
File metadata and controls
23 lines (21 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use thiserror::Error;
pub type Result<T> = std::result::Result<T, ProcessingError>;
#[derive(Error, Debug)]
pub enum ProcessingError {
#[error("App was accessed from multiple threads")]
AppAccess,
#[error("Error initializing tracing: {0}")]
Tracing(#[from] tracing::subscriber::SetGlobalDefaultError),
#[error("Window not found")]
WindowNotFound,
#[error("Handle error: {0}")]
HandleError(#[from] raw_window_handle::HandleError),
#[error("Invalid window handle provided")]
InvalidWindowHandle,
#[error("Image not found")]
ImageNotFound,
#[error("Unsupported texture format")]
UnsupportedTextureFormat,
#[error("Invalid argument: {0}")]
InvalidArgument(String),
}