summaryrefslogtreecommitdiff
path: root/webhogg/wasm/src/error.rs
diff options
context:
space:
mode:
authorDennis Kobert <d-kobert@web.de>2019-06-14 17:46:52 +0200
committerDennis Kobert <d-kobert@web.de>2019-06-14 17:46:52 +0200
commit031f63755aada2f1b51eb945fda2a18ad0d24aad (patch)
tree67ec62726748e734e0032e621107dd7a5fe1423a /webhogg/wasm/src/error.rs
parent6fc34ce9e0485a093487baf50738fc1ffb70ce82 (diff)
parenta4532a3f034850c9fe8e26cc210bda618136dcbf (diff)
Merge branch 'wasm' of https://github.com/TrueDoctor/DiscoBot into wasm
Diffstat (limited to 'webhogg/wasm/src/error.rs')
-rw-r--r--webhogg/wasm/src/error.rs6
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",
}
}
}