-
Notifications
You must be signed in to change notification settings - Fork 131
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
Unify error enums & generation #857
Labels
A-chores
Something that has to be done, as part of regular maintenance
Good First Issue
Good for newcomers
P-Relay
Milestone
Comments
tomusdrw
added
Good First Issue
Good for newcomers
A-chores
Something that has to be done, as part of regular maintenance
B-Substrate <> Substrate
P-Relay
labels
Apr 1, 2021
This was referenced Apr 1, 2021
Merged
vmarkushin
added a commit
to vmarkushin/parity-bridges-common
that referenced
this issue
Jul 11, 2021
Related to paritytech#857 There are many String-typed errors that could be transformed to similar error enums, but since they only used once, I decided to not touch them and just change the existing ones (although, it could improve readability).
vmarkushin
added a commit
to vmarkushin/parity-bridges-common
that referenced
this issue
Aug 28, 2021
Related to paritytech#857 There are many String-typed errors that could be transformed to similar error enums, but since they only used once, I decided to not touch them and just change the existing ones (although, it could improve readability).
vmarkushin
added a commit
to vmarkushin/parity-bridges-common
that referenced
this issue
Oct 14, 2021
tomusdrw
pushed a commit
that referenced
this issue
Oct 22, 2021
tomusdrw
modified the milestones:
When Thou Have Spare Hour (2021),
When Thou Have Spare Hour
Nov 15, 2021
Assuming closed with #1094 |
serban300
pushed a commit
to serban300/parity-bridges-common
that referenced
this issue
Mar 27, 2024
…aritytech#1094) * Unify error enums in substrate and ethereum clients with `thiserror` Related to paritytech#857 * Add license pre-amble * rustfmt * Fix spelling
serban300
pushed a commit
to serban300/parity-bridges-common
that referenced
this issue
Apr 8, 2024
…aritytech#1094) * Unify error enums in substrate and ethereum clients with `thiserror` Related to paritytech#857 * Add license pre-amble * rustfmt * Fix spelling
bkchr
pushed a commit
to paritytech/polkadot-sdk
that referenced
this issue
Apr 10, 2024
…(#1094) * Unify error enums in substrate and ethereum clients with `thiserror` Related to paritytech/parity-bridges-common#857 * Add license pre-amble * rustfmt * Fix spelling
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-chores
Something that has to be done, as part of regular maintenance
Good First Issue
Good for newcomers
P-Relay
Currently we mostly use manually implemented
Error
enums across the codebase. These enums do not necessarily implementstd::error::Error
trait, which is fine for runtime stuff, but would be useful for relayer code.The relayer code is using
String
errors though, cause we mostly don't care about anything specific, but need to propagate it up in the stack.Recently in #813
anyhow
got introduced and now with #849 there is even more error-specific refactorings being done.@adoerr suggested to use
anyhow / thiserror
combo to unify error handling which I think is the right idea.Basically the rule is:
anyhow
for the last mile CLI stuff, where we really don't care about the error.thiserror
for non-cli libraries that are used outside of the runtime to avoid manualDisplay/std::io::Error
implementation.The text was updated successfully, but these errors were encountered: