From 6e18888f652bbce37a2ef8a059bd9e187b83f6dd Mon Sep 17 00:00:00 2001 From: Akshay Date: Wed, 31 Mar 2021 16:51:23 +0530 Subject: add cli error types --- src/error.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 @@ -use crate::lisp::error::LispError; +use crate::{cli::CliError, lisp::error::LispError}; use std::{error, fmt, io}; @@ -10,6 +10,7 @@ pub enum AppError { File(io::Error), Sdl(String), SdlTTF(SdlTTFError), + Cli(CliError), } impl fmt::Display for AppError { @@ -19,6 +20,7 @@ impl fmt::Display for AppError { Self::File(e) => write!(f, "file error: {}", e), Self::Sdl(e) => write!(f, "sdl2 error: {}", e), Self::SdlTTF(e) => write!(f, "ttf error: {}", e), + Self::Cli(e) => write!(f, "cli error: {}", e), } } } -- cgit v1.2.3