Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-core/src/errors.rs @ 49501:9f14126cfc4c
rust: add support for hints in error messages
This will be used by the narrow support code in the next commit.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Tue, 19 Jul 2022 17:07:09 +0200 |
parents | 3f86ee422095 |
children | 491f3dd080eb |
line wrap: on
line diff
--- a/rust/hg-core/src/errors.rs Mon Jul 11 11:59:13 2022 +0200 +++ b/rust/hg-core/src/errors.rs Tue Jul 19 17:07:09 2022 +0200 @@ -33,6 +33,7 @@ Abort { message: String, detailed_exit_code: exit_codes::ExitCode, + hint: Option<String>, }, /// A configuration value is not in the expected syntax. @@ -82,10 +83,12 @@ pub fn abort( explanation: impl Into<String>, exit_code: exit_codes::ExitCode, + hint: Option<String>, ) -> Self { HgError::Abort { message: explanation.into(), detailed_exit_code: exit_code, + hint, } } }