aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-03-31 12:21:23 +0100
committerAkshay <[email protected]>2021-03-31 12:21:23 +0100
commit6e18888f652bbce37a2ef8a059bd9e187b83f6dd (patch)
treee77663ece1d5c34542be2623ee8fa210ae79e6af /src
parentcad96556adaad9623101405de329d64abd39e674 (diff)
add cli error types
Diffstat (limited to 'src')
-rw-r--r--src/error.rs4
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 @@
1use crate::lisp::error::LispError; 1use crate::{cli::CliError, lisp::error::LispError};
2 2
3use std::{error, fmt, io}; 3use 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
15impl fmt::Display for AppError { 16impl 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}