From bf0137c3fc6093df085b9d95cd251b7f67d94815 Mon Sep 17 00:00:00 2001 From: natrixaeria Date: Wed, 29 May 2019 21:51:49 +0200 Subject: Create webhogg project directory --- WebInterface/wasm/webhogg/src/webhogg_exception.rs | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 WebInterface/wasm/webhogg/src/webhogg_exception.rs (limited to 'WebInterface/wasm/webhogg/src/webhogg_exception.rs') 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()) + } +} -- cgit v1.2.3-54-g00ecf