From e1c79889d3bf02c8d131d642fed8ba7ef9521bf4 Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Tue, 27 Dec 2022 11:46:22 +0100 Subject: some error stuff; version update --- src/error.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 1ac2a48..192aa76 100644 --- a/src/error.rs +++ b/src/error.rs @@ -12,6 +12,7 @@ pub struct MLError { #[derive(Debug, Deserialize)] pub enum ErrorType { ArgumentError, + ArgumentCountError, ConfigError, LibToml, IoError, @@ -26,7 +27,8 @@ impl std::error::Error for MLError { impl fmt::Display for MLError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self.etype { - ErrorType::ArgumentError => write!(f, "ARGS"), + ErrorType::ArgumentError => write!(f, "Wrong argument"), + ErrorType::ArgumentCountError => write!(f, "Too many/too few arguments"), ErrorType::ConfigError => write!(f, "CONFIG"), ErrorType::LibToml => write!(f, "TOML"), ErrorType::IoError => write!(f, "IO") -- cgit v1.2.3