Mercurial > hg
changeset 46441:741e36f472a5
rhg: Print an error message in more cases
Differential Revision: https://phab.mercurial-scm.org/D9895
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Wed, 27 Jan 2021 15:04:51 +0100 |
parents | 776b97179c06 |
children | 02d3bb972121 |
files | rust/rhg/src/error.rs |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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())) + } } }