diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/error.rs b/src/error.rs index f981f14..a2b37a8 100644 --- a/src/error.rs +++ b/src/error.rs | |||
@@ -34,8 +34,12 @@ impl std::error::Error for MLError { | |||
34 | impl fmt::Display for MLError { | 34 | impl fmt::Display for MLError { |
35 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | 35 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
36 | match self.etype { | 36 | match self.etype { |
37 | ErrorType::ArgumentError => write!(f, "User input not accepted: {}", self.message), | 37 | ErrorType::ArgumentError => { |
38 | ErrorType::ArgumentCountError => write!(f, "Too many/too few arguments"), | 38 | write!(f, "User input not accepted: {}", self.message) |
39 | } | ||
40 | ErrorType::ArgumentCountError => { | ||
41 | write!(f, "Too many/too few arguments") | ||
42 | } | ||
39 | ErrorType::ConfigError => write!(f, "CONFIG"), | 43 | ErrorType::ConfigError => write!(f, "CONFIG"), |
40 | ErrorType::DBError => write!(f, "Database: {}", self.message), | 44 | ErrorType::DBError => write!(f, "Database: {}", self.message), |
41 | ErrorType::ModError => write!(f, "Mod: {}", self.message), | 45 | ErrorType::ModError => write!(f, "Mod: {}", self.message), |