summaryrefslogtreecommitdiff
path: root/common/rust/src/error.rs
diff options
context:
space:
mode:
authorMatthieu <20992787+MatthieuCoder@users.noreply.github.com>2021-09-26 01:24:07 +0400
committerGitHub <noreply@github.com>2021-09-26 01:24:07 +0400
commit4ad3510c0552aa8b65866590873c7b13bc2d5243 (patch)
treee08ed094a63b14cc79975c1f11492a477970f0d3 /common/rust/src/error.rs
parentba50243c2f852a1b09e8794e5498e6ed181eb93b (diff)
parent376f00642c2adba158b148a7933383af53ecdba1 (diff)
Merge pull request #3 from discordnova/new-gateway
Rust gateway implementation
Diffstat (limited to 'common/rust/src/error.rs')
-rw-r--r--common/rust/src/error.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/rust/src/error.rs b/common/rust/src/error.rs
new file mode 100644
index 0000000..b602940
--- /dev/null
+++ b/common/rust/src/error.rs
@@ -0,0 +1,12 @@
+use std::fmt;
+
+#[derive(Debug)]
+pub struct NovaError {
+ pub message: String,
+}
+
+impl fmt::Display for NovaError {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ write!(f, "An error occured wihind the nova system: {}", self.message) // user-facing output
+ }
+}