summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2022-12-27 11:46:22 +0100
committerFxQnLr <[email protected]>2022-12-27 11:46:22 +0100
commite1c79889d3bf02c8d131d642fed8ba7ef9521bf4 (patch)
tree82c9f375ecbcf4f51f7ff453b5f19299389eb178 /src/error.rs
parent0515548682a95db643a008146105d8ecdb446e58 (diff)
downloadmodlist-e1c79889d3bf02c8d131d642fed8ba7ef9521bf4.tar
modlist-e1c79889d3bf02c8d131d642fed8ba7ef9521bf4.tar.gz
modlist-e1c79889d3bf02c8d131d642fed8ba7ef9521bf4.zip
some error stuff; version update
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs4
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)]
13pub enum ErrorType { 13pub 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 {
26impl fmt::Display for MLError { 27impl 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")