diff options
author | natrixaeria <janng@gmx.de> | 2019-06-11 20:24:45 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-06-11 20:24:45 +0200 |
commit | b21428c0ea29452e3edc5a11f72fa3e614ea617e (patch) | |
tree | f8f04744fe61700e59d68eec1de8dc562c1ed689 /WebInterface/wasm/webhogg/src/webhogg_exception.rs | |
parent | 8276c94169c7f6027691f124c63b61c815ab15a5 (diff) |
Remove the WebInterface directory
and create webhogg project folder
Diffstat (limited to 'WebInterface/wasm/webhogg/src/webhogg_exception.rs')
-rw-r--r-- | WebInterface/wasm/webhogg/src/webhogg_exception.rs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/WebInterface/wasm/webhogg/src/webhogg_exception.rs b/WebInterface/wasm/webhogg/src/webhogg_exception.rs deleted file mode 100644 index 46eedd6..0000000 --- a/WebInterface/wasm/webhogg/src/webhogg_exception.rs +++ /dev/null @@ -1,39 +0,0 @@ -use std::error::Error; - -#[derive(Debug)] -pub enum WebhoggException { - DomError(String), - WebGlContextError(String), -} - -impl WebhoggException { - fn err_name(&self) -> &str { - match self { - WebhoggException::DomError(_) => "DomError", - WebhoggException::WebGlContextError(_) => "WebGlContextError", - } - } -} - -impl Error for WebhoggException { - fn description(&self) -> &str { - match self { - WebhoggException::DomError(desc) => desc, - WebhoggException::WebGlContextError(desc) => desc, - } - } - - fn cause(&self) -> Option<&dyn Error> { - self.source() - } - - fn source(&self) -> Option<&(dyn Error + 'static)> { - None - } -} - -impl std::fmt::Display for WebhoggException { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - write!(f, "WebhoggException::{} {}", self.err_name(), self.description()) - } -} |