Helper function for retrieving root stack trace from error#113
Closed
creasty wants to merge 4 commits intopkg:masterfrom
creasty:creasty/expose_stack_trace
Closed
Helper function for retrieving root stack trace from error#113creasty wants to merge 4 commits intopkg:masterfrom creasty:creasty/expose_stack_trace
creasty wants to merge 4 commits intopkg:masterfrom
creasty:creasty/expose_stack_trace
Conversation
|
This would also help to implement stack traces in |
Member
|
Please open an issue to discuss your design before sending and implantation. Thank you.
… On 18 Apr 2017, at 12:35, Martin Heidegger ***@***.***> wrote:
This would also help to implement stack traces in sentry: getsentry/raven-go#88
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Author
|
Sorry, didn't read
|
Member
|
Thank you. It is important to discuss the problem you have before proposing
a solution.
…On Tue, 18 Apr 2017, 18:07 Yuki Iwanaga ***@***.***> wrote:
Sorry, didn't read
Contributing
...
Before proposing a change, please discuss your change by raising an issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#113 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA6M6jwbu7lMZCAAVYc0Xei43Uv4Wks5rxG8jgaJpZM4M_BJq>
.
|
Author
|
Actually, I've created a better solution at https://github.com/srvc/fail and stopped using pkg/errors. c.f., Create a virtual stack trace by merging multiple stack traces |
|
@creasty I saw svc/fail. I really like what the package offers and particularly the idea of being able to merge stack traces. However, I am concerned about the potential for worse performance with all the stack trace creation and I am also working towards a different place in the design space by using our fork of pkg/errors as a base and building a package for error codes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
For now, the simplest way to do so is by using Formatter as follows.
Use case
Most feasible use case is an integration with error reporting systems such as honeybadger.
https://github.com/honeybadger-io/honeybadger-go/blob/f37170201ccce33edcb44f976565698c5aeb7fc4/error.go#L13-L17
What
Create a helper function
errors.Tracewhich behaves likeerrors.Causeand returns the underlying stack trace ([]Frame) of the error.