diff options
author | natrixaeria <janng@gmx.de> | 2019-06-14 17:20:01 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-06-14 17:20:01 +0200 |
commit | 438825a7ce98a0cd455ff0adebd6d3cf8d3209be (patch) | |
tree | 30c4290562910c27c3a11a05344c6b236be62fbf /webhogg/wasm/src/error.rs | |
parent | 4fd207e78452a9e282ef65fc9c3eaf8b19115956 (diff) |
Draw a rectangle
Diffstat (limited to 'webhogg/wasm/src/error.rs')
-rw-r--r-- | webhogg/wasm/src/error.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webhogg/wasm/src/error.rs b/webhogg/wasm/src/error.rs index 1c6ec27..fbb6bf8 100644 --- a/webhogg/wasm/src/error.rs +++ b/webhogg/wasm/src/error.rs @@ -3,6 +3,8 @@ use std::error::Error; #[derive(Debug)] pub enum WasmError { WebGl2ContextCreation(String), + Shader(String), + WebGlBuffer(String), } impl std::fmt::Display for WasmError { @@ -15,6 +17,8 @@ impl Error for WasmError { fn description(&self) -> &str { match self { WasmError::WebGl2ContextCreation(msg) => msg, + WasmError::Shader(msg) => msg, + WasmError::WebGlBuffer(msg) => msg, } } @@ -25,6 +29,8 @@ impl WasmError { pub fn name(&self) -> &str { match self { WasmError::WebGl2ContextCreation(_) => "WebGl2ContextCreationError", + WasmError::Shader(_) => "ShaderError", + WasmError::WebGlBuffer(_) => "WebGlBufferError", } } } |