diff -r 37bcd7f5a543 -r ead435aa5294 rust/rhg/src/error.rs --- a/rust/rhg/src/error.rs Wed Nov 25 11:08:28 2020 -0500 +++ b/rust/rhg/src/error.rs Tue Nov 24 15:11:58 2020 +0100 @@ -12,6 +12,9 @@ RootNotFound(PathBuf), /// The current directory cannot be found CurrentDirNotFound(std::io::Error), + /// Error while reading or writing a file + // TODO: add the file name/path? + FileError(std::io::Error), /// The standard output stream cannot be written to StdoutError, /// The standard error stream cannot be written to @@ -27,6 +30,7 @@ match self { CommandErrorKind::RootNotFound(_) => exitcode::ABORT, CommandErrorKind::CurrentDirNotFound(_) => exitcode::ABORT, + CommandErrorKind::FileError(_) => exitcode::ABORT, CommandErrorKind::StdoutError => exitcode::ABORT, CommandErrorKind::StderrError => exitcode::ABORT, CommandErrorKind::Abort(_) => exitcode::ABORT,