diff options
author | natrixaeria <janng@gmx.de> | 2019-05-29 21:51:49 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-05-29 21:51:49 +0200 |
commit | bf0137c3fc6093df085b9d95cd251b7f67d94815 (patch) | |
tree | 435f024e02e4f0bd867d1ca5a829d3ef19a97545 /WebInterface/wasm/webhogg/src/webhogg_exception.rs | |
parent | a6d2d62fae44b6d8c96e51055f7222bc679efc48 (diff) |
Create webhogg project directory
Diffstat (limited to 'WebInterface/wasm/webhogg/src/webhogg_exception.rs')
-rw-r--r-- | WebInterface/wasm/webhogg/src/webhogg_exception.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/WebInterface/wasm/webhogg/src/webhogg_exception.rs b/WebInterface/wasm/webhogg/src/webhogg_exception.rs new file mode 100644 index 0000000..eac67c7 --- /dev/null +++ b/WebInterface/wasm/webhogg/src/webhogg_exception.rs @@ -0,0 +1,25 @@ +use std::error::Error; + +#[derive(Debug)] +pub enum WebhoggException { +} + +impl Error for WebhoggException { + fn description(&self) -> &str { + "webhogg exception" + } + + 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.description()) + } +} |