-
Notifications
You must be signed in to change notification settings - Fork 229
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
Rework Faktory's error handling to include more context #296
Comments
In Go, to have context you have to wrap errors with the E.g. file, err := OpenFile()
if err != nil {
return fmt.Errorf("cannot open file: %w", err)
} I can open pull request with the error wrapping if it can helps. |
@gearnode I was thinking we could integrate pkg/errors but I don't know how much value it provides vs error handling in Go 1.13+. |
Since Go 1.13 the |
@mperham I send you a first draft git patch if you want some help to wrap errors :) |
I didn't see any patch?
…On Sat, May 2, 2020 at 5:16 PM Bryan FRIMIN ***@***.***> wrote:
@mperham <https://github.com/mperham> I send you a first draft git patch
if you want some help to wrap errors :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#296 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAWX5K4VJUXRUADGM7XEDRPSZXFANCNFSM4MMOKSLA>
.
|
My bad I forgot to open the patch :( |
Today Faktory gets errors and naively prints them out, without any sort of context or backtrace. Seeing something like "Socket closed: EOF" gives the user exactly zero information with which to debug.
return err
block.The text was updated successfully, but these errors were encountered: