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

[mgs] Use slog-error-chain to clean up error types and logging #4717

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

jgallagher
Copy link
Contributor

These are all pretty mechanical changes:

  • Use #[source] and #[from] correctly
  • Add a bit of context to a few error cases (e.g., including the SpIdentifier when returning an SpCommunicationFailed error)
  • Use InlineErrorChain instead of anyhow to convert error chains into strings (avoiding the intermediate anyhow::Error heap allocation)
  • Switch to Utf8PathBuf for command line args and related errors

Copy link
Contributor

@andrewjstone andrewjstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup!

@jgallagher jgallagher merged commit e464172 into main Dec 19, 2023
22 checks passed
@jgallagher jgallagher deleted the mgs-slog-error-chain branch December 19, 2023 17:50
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.

2 participants