rhg: Print an error message in more cases
Differential Revision: https://phab.mercurial-scm.org/D9895
--- a/rust/rhg/src/error.rs Wed Jan 27 14:00:21 2021 +0100
+++ b/rust/rhg/src/error.rs Wed Jan 27 15:04:51 2021 +0100
@@ -73,7 +73,16 @@
)
}
CommandError::Abort(message) => message.to_owned(),
- _ => None,
+
+ CommandError::RequirementsError(_)
+ | CommandError::StdoutError
+ | CommandError::StderrError
+ | CommandError::Unimplemented
+ | CommandError::Other(HgError::UnsupportedFeature(_)) => None,
+
+ CommandError::Other(e) => {
+ Some(format_bytes!(b"{}\n", e.to_string().as_bytes()))
+ }
}
}