From 6e3218f2e405629cb5cd54d498c2e7c1f2a10941 Mon Sep 17 00:00:00 2001 From: Joakim Soderlund Date: Sun, 21 Jul 2019 14:45:48 +0000 Subject: [PATCH] Add error module for abstraction --- src/error.rs | 9 +++++++++ src/main.rs | 1 + 2 files changed, 10 insertions(+) create mode 100644 src/error.rs diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..4996c44 --- /dev/null +++ b/src/error.rs @@ -0,0 +1,9 @@ +//! Error types. + +#[derive(Debug)] +pub enum Error { + InvalidStory(), + SourceError(&'static str), +} + +pub type Result = std::result::Result; diff --git a/src/main.rs b/src/main.rs index 79ea707..669cf15 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,6 @@ //! Main module. +pub mod error; pub mod story; fn main() {