You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the default error_handler middleware, I wanted to allow for printing a stack trace to the log when an unexpected error happens as it is these kind of errors that you want to know where the error occurred. I made this change locally by using github.com/pkg/errors to change NewErrorClass to use https://godoc.org/github.com/pkg/errors#Wrap and then changed the error_handler middleware to use https://godoc.org/github.com/pkg/errors#Cause. This allowed a very simple change to the log statement to print the stack trace.
I wondered if this would be something you might like to include on master. If so I will create a PR with my changes
The text was updated successfully, but these errors were encountered:
maleck13
changed the title
propose using pkg/errors to allow stack trace on unexpected errors
Proposal using pkg/errors to allow stack trace on unexpected errors
Sep 18, 2016
Using the default error_handler middleware, I wanted to allow for printing a stack trace to the log when an unexpected error happens as it is these kind of errors that you want to know where the error occurred. I made this change locally by using github.com/pkg/errors to change NewErrorClass to use
https://godoc.org/github.com/pkg/errors#Wrap and then changed the error_handler middleware to use https://godoc.org/github.com/pkg/errors#Cause. This allowed a very simple change to the log statement to print the stack trace.
I wondered if this would be something you might like to include on master. If so I will create a PR with my changes
The text was updated successfully, but these errors were encountered: