| 30 | |
| 31 | impl std::fmt::Debug for CliError { |
| 32 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
| 33 | match self { |
| 34 | Self::ParseFailed => write!(f, "Parsing Failed!"), |
| 35 | Self::FilesAndStdin => { |
| 36 | write!(f, "Specified multiple files including stdin. Try passing just files, or use `-` for stdin.") |
| 37 | } |
| 38 | Self::Checks(i) => f.write_str(&format!("{i} files failed check!")), |
| 39 | Self::Io(arg0) => f.debug_tuple("::io::Error").field(arg0).finish(), |
| 40 | Self::Fmt(arg0) => f.debug_tuple("::fmt::Error").field(arg0).finish(), |
| 41 | Self::SerdeJson(arg0) => f.debug_tuple("::serde_json::Error").field(arg0).finish(), |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | impl From<CliError> for ExitCode { |