Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-core/src/errors.rs @ 46511:43d63979a75e
rust: use HgError in RevlogError and Vfs
Differential Revision: https://phab.mercurial-scm.org/D9897
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Wed, 27 Jan 2021 14:45:25 +0100 |
parents | 39e9407820ac |
children | d03b0601e0eb |
line wrap: on
line diff
--- a/rust/hg-core/src/errors.rs Wed Jan 27 14:59:09 2021 +0100 +++ b/rust/hg-core/src/errors.rs Wed Jan 27 14:45:25 2021 +0100 @@ -35,6 +35,9 @@ impl HgError { pub fn corrupted(explanation: impl Into<String>) -> Self { + // TODO: capture a backtrace here and keep it in the error value + // to aid debugging? + // https://doc.rust-lang.org/std/backtrace/struct.Backtrace.html HgError::CorruptedRepository(explanation.into()) } }