diff options
Diffstat (limited to 'bin/src/err.rs')
-rw-r--r-- | bin/src/err.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/src/err.rs b/bin/src/err.rs index 4c16d69..1e52c2b 100644 --- a/bin/src/err.rs +++ b/bin/src/err.rs | |||
@@ -12,6 +12,8 @@ pub enum ConfigErr { | |||
12 | InvalidPath(#[from] io::Error), | 12 | InvalidPath(#[from] io::Error), |
13 | #[error("unable to parse `{0}` as line and column")] | 13 | #[error("unable to parse `{0}` as line and column")] |
14 | InvalidPosition(String), | 14 | InvalidPosition(String), |
15 | #[error("unable to parse `{0}` as warning code")] | ||
16 | InvalidWarningCode(String), | ||
15 | } | 17 | } |
16 | 18 | ||
17 | // #[derive(Error, Debug)] | 19 | // #[derive(Error, Debug)] |
@@ -41,6 +43,12 @@ pub enum SingleFixErr { | |||
41 | } | 43 | } |
42 | 44 | ||
43 | #[derive(Error, Debug)] | 45 | #[derive(Error, Debug)] |
46 | pub enum ExplainErr { | ||
47 | #[error("lint with code `{0}` not found")] | ||
48 | LintNotFound(u32), | ||
49 | } | ||
50 | |||
51 | #[derive(Error, Debug)] | ||
44 | pub enum StatixErr { | 52 | pub enum StatixErr { |
45 | // #[error("linter error: {0}")] | 53 | // #[error("linter error: {0}")] |
46 | // Lint(#[from] LintErr), | 54 | // Lint(#[from] LintErr), |
@@ -50,4 +58,6 @@ pub enum StatixErr { | |||
50 | Single(#[from] SingleFixErr), | 58 | Single(#[from] SingleFixErr), |
51 | #[error("config error: {0}")] | 59 | #[error("config error: {0}")] |
52 | Config(#[from] ConfigErr), | 60 | Config(#[from] ConfigErr), |
61 | #[error("explain error: {0}")] | ||
62 | Explain(#[from] ExplainErr), | ||
53 | } | 63 | } |