Introduce VortexError::Other and simplify Display implementation
#6410
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Does this PR closes an open issue or discussion?
This is a long running low burning effort to improve errors.
What changes are included in this PR?
VortexError::Urlvariant - I don't think a single digit number of uses in peripheral crates merits a variant and a dependency here.Genericerror variant intoExternalandOther, whereExternalis meant to wrap external errors, andOtheris for any error that doesn't match an existing variant.Otheris now also the default ofvortex_errandvortex_bail. They are used widely and often have very different meaning, I think its better to convey vague intent than the wrong one.Displayform to make it clearer what gets printed and how its constructed.What is the rationale for this change?
Error display is a bit more compact when downstream users don't enable backtraces, and I believe this makes maintaining
vortex-errora bit easier.How is this change tested?
In addition to existing tests that verify the result type, I've added a few tests that
Are there any user-facing changes?
One less variant, and
vortex_errandvortex_bailreturn a different type.