diff options
Diffstat (limited to 'src/error.rs')
-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 1ac2a48..192aa76 100644 --- a/src/error.rs +++ b/src/error.rs | |||
@@ -12,6 +12,7 @@ pub struct MLError { | |||
12 | #[derive(Debug, Deserialize)] | 12 | #[derive(Debug, Deserialize)] |
13 | pub enum ErrorType { | 13 | pub enum ErrorType { |
14 | ArgumentError, | 14 | ArgumentError, |
15 | ArgumentCountError, | ||
15 | ConfigError, | 16 | ConfigError, |
16 | LibToml, | 17 | LibToml, |
17 | IoError, | 18 | IoError, |
@@ -26,7 +27,8 @@ impl std::error::Error for MLError { | |||
26 | impl fmt::Display for MLError { | 27 | impl fmt::Display for MLError { |
27 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | 28 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
28 | match self.etype { | 29 | match self.etype { |
29 | ErrorType::ArgumentError => write!(f, "ARGS"), | 30 | ErrorType::ArgumentError => write!(f, "Wrong argument"), |
31 | ErrorType::ArgumentCountError => write!(f, "Too many/too few arguments"), | ||
30 | ErrorType::ConfigError => write!(f, "CONFIG"), | 32 | ErrorType::ConfigError => write!(f, "CONFIG"), |
31 | ErrorType::LibToml => write!(f, "TOML"), | 33 | ErrorType::LibToml => write!(f, "TOML"), |
32 | ErrorType::IoError => write!(f, "IO") | 34 | ErrorType::IoError => write!(f, "IO") |