diff options
| author | Matthieu <20992787+MatthieuCoder@users.noreply.github.com> | 2021-09-26 01:24:34 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-26 01:24:34 +0400 |
| commit | fe11cf23da7e996613b1d8df503c2a085ac40d31 (patch) | |
| tree | e08ed094a63b14cc79975c1f11492a477970f0d3 /common/rust/src/error.rs | |
| parent | f2e6047c21b3ee814670b17e5901d12ac52a3508 (diff) | |
| parent | 4ad3510c0552aa8b65866590873c7b13bc2d5243 (diff) | |
Merge pull request #6 from discordnova/webhook-receiver
Webhook receiver
Diffstat (limited to 'common/rust/src/error.rs')
| -rw-r--r-- | common/rust/src/error.rs | 12 |
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 + } +} |
