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
45 lines (43 loc) · 1.38 KB
/
error.rs
File metadata and controls
45 lines (43 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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("Surface not found")]
SurfaceNotFound,
#[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),
#[error("Graphics not found")]
GraphicsNotFound,
#[error("Invalid entity")]
InvalidEntity,
#[error("Geometry not found")]
GeometryNotFound,
#[error("Layout not found")]
LayoutNotFound,
#[error("Transform not found")]
TransformNotFound,
#[error("Material not found")]
MaterialNotFound,
#[error("Unknown material property: {0}")]
UnknownMaterialProperty(String),
#[error("GLTF load error: {0}")]
GltfLoadError(String),
#[error("Webcam not connected")]
WebcamNotConnected,
#[error("Shader compilation error: {0}")]
ShaderCompilationError(String),
#[error("Shader not found")]
ShaderNotFound,
}