chore: ensure libevm new files wrap errors with appropriate context #91
Labels
Category: Code quality ✏️
Category: Documentation ✒️
A problem with the readme or a code comment.
Complexity: 🟦 Easy to do
Priority: 💤 Low priority
Rationale
We should be able to quickly find where an error is coming from, and have a minimal context on what failed. To do so we can:
fmt.Errorf("doing this: %s", err)
to wrap errors coming from 'below' layersfmt.Errorf("failed this: some details context")
when creating an error, with necessary details==
instead oferrors.Is
otherwise it means we cannot add error context wrapping.Implementation
Check all
*libevm*
files as well as geth original source files that were modified for:return.+err
and add wrapping if appropriatereturn
statements in case we return the error directly without wrapping i.e.return f()
wheref
returns an errorℹ️ Note we obviously don't want to modify parts we did not add on top of geth and that we did not modify in geth original code
The text was updated successfully, but these errors were encountered: