Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add anyhow replacement #3777

Closed
wants to merge 2 commits into from
Closed

Add anyhow replacement #3777

wants to merge 2 commits into from

Conversation

ss-es
Copy link
Contributor

@ss-es ss-es commented Oct 21, 2024

This PR:

Adds a replacement for anyhow that logs like tracing.

Currently, the crate propagates an error to the top level. ensure! and bail! macro also log the error in-place at the given level, allowing for instrumentation.

This is used in #3738, to allow some more tasks to return a Result<()>.

This PR does not:

Key places to review:

I think the implementation is relatively flexible and we can adjust to log centrally and/or log at the ensure! statements. I think the main thing to do would be to take a quick look at #3738 and see that the usage there is reasonable

@ss-es ss-es closed this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants