-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat: improve error wrapping, stack trace management, and formatting #46
Conversation
Codecov Report
@@ Coverage Diff @@
## master #46 +/- ##
==========================================
- Coverage 95.57% 94.29% -1.28%
==========================================
Files 3 3
Lines 226 228 +2
==========================================
- Hits 216 215 -1
- Misses 8 9 +1
- Partials 2 4 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am yet to review the examples you added but I have reviewed the code. Overall I suggest that we add some comments, especially in format.go and stack.go. It is a pain but a few days from now if we look at our code we won't understand it easily without the comments.
fe67a73
to
0273d62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format.go could be better with some comments but feel free to skip it. I am planning to add some in the formatter PR
97e1e2c
to
1784b3d
Compare
This commit includes a change to error wrapping that enables wrap error stack frames to be inserted into the root error stack trace. It also changes error formatting to display root errors first followed by wrapped errors in the same order as the stack trace (same order as runtime.Callers).
1784b3d
to
ab35abd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍
This commit includes a change to error wrapping that enables wrap error stack frames to be inserted into the root error stack trace. It also changes error formatting to display root errors first followed by wrapped errors in the same order as the stack trace (same order as runtime.Callers).