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

Use Error.tag/tag_arg instead of stringifying errors #6751

Merged
merged 8 commits into from
Nov 20, 2020

Conversation

mrmr1993
Copy link
Member

This PR replaces some Error.to_string_hum with Error.tag and Error.tag_arg. These add additional data to errors without forcing their format, and play much more nicely with our pretty-printing in the logger.

A few uses still remain, mostly where the error is passed through calls between being cast to a string and being re-cast to an error. These are few and can be done as follow-up work at some later time.

Checklist:

  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? List them:

Closes #6699

@mrmr1993 mrmr1993 requested review from a team as code owners November 18, 2020 22:11
@mrmr1993 mrmr1993 added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Nov 18, 2020
Copy link
Member

@psteckler psteckler left a comment

Choose a reason for hiding this comment

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

Sanity reigns!

@mergify mergify bot merged commit 5ed9198 into develop Nov 20, 2020
@mergify mergify bot deleted the feature/error-tag branch November 20, 2020 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch ready-to-merge-into-develop
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Core.Error.tag/tag_arg when adding info to errors
3 participants