diff options
author | Akshay <[email protected]> | 2021-03-31 12:21:23 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-03-31 12:21:23 +0100 |
commit | 6e18888f652bbce37a2ef8a059bd9e187b83f6dd (patch) | |
tree | e77663ece1d5c34542be2623ee8fa210ae79e6af | |
parent | cad96556adaad9623101405de329d64abd39e674 (diff) |
add cli error types
-rw-r--r-- | src/error.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs index ff25db7..471af3a 100644 --- a/src/error.rs +++ b/src/error.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use crate::lisp::error::LispError; | 1 | use crate::{cli::CliError, lisp::error::LispError}; |
2 | 2 | ||
3 | use std::{error, fmt, io}; | 3 | use std::{error, fmt, io}; |
4 | 4 | ||
@@ -10,6 +10,7 @@ pub enum AppError { | |||
10 | File(io::Error), | 10 | File(io::Error), |
11 | Sdl(String), | 11 | Sdl(String), |
12 | SdlTTF(SdlTTFError), | 12 | SdlTTF(SdlTTFError), |
13 | Cli(CliError), | ||
13 | } | 14 | } |
14 | 15 | ||
15 | impl fmt::Display for AppError { | 16 | impl fmt::Display for AppError { |
@@ -19,6 +20,7 @@ impl fmt::Display for AppError { | |||
19 | Self::File(e) => write!(f, "file error: {}", e), | 20 | Self::File(e) => write!(f, "file error: {}", e), |
20 | Self::Sdl(e) => write!(f, "sdl2 error: {}", e), | 21 | Self::Sdl(e) => write!(f, "sdl2 error: {}", e), |
21 | Self::SdlTTF(e) => write!(f, "ttf error: {}", e), | 22 | Self::SdlTTF(e) => write!(f, "ttf error: {}", e), |
23 | Self::Cli(e) => write!(f, "cli error: {}", e), | ||
22 | } | 24 | } |
23 | } | 25 | } |
24 | } | 26 | } |