mirror of
https://github.com/facebook/sapling.git
synced 2024-12-26 06:21:48 +03:00
b9f3c9c692
Summary: Introduce taggederror-util, which provides a new trait `AnyhowEdenExt`, which provides a method `eden_metadata` for anyhow errors and results. This method works much like `AnyhowExt::common_metadata`, but additionally supports extracting default error metadata from known `Tagged` types which are listed explicitly in the method implementation. Extend `FilteredAnyhow` to support a configuration "metadata function", which allows swapping out `eden_metadata` for the standard `common_metadata`. Modify Rust dispatch and Python bindings to use `AnyhowEdenExt` for metadata extraction and printing. Modify `intentional_error` to rely on `AnyhowEdenExt` for tagging (removes `.tagged` call, no tags will be visible if `AnyhowEdenExt` is not used). Reviewed By: DurhamG Differential Revision: D22927203 fbshipit-source-id: 04b36fdfaa24af591118acb9e418d1ed7ae33f91 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |