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
I made a spiritual successor of github.com/pkg/errors some time ago and in it I want to know if an error already contains a stack trace. The goal is that if a large codebase uses different packages for errors, they should work together and not hide existing recorded information, like a stack trace.
It seems this package does not expose the stack trace as []uintptr but only as a formatted string?
I would suggest that the following interface is implemented:
type stackTracer interface {
StackTrace() []uintptr
}
Then, it is easy to obtain a stack trace, use it, format it. To me it looks like a simple type cast should be enough to do so?
The text was updated successfully, but these errors were encountered:
I made a spiritual successor of
github.com/pkg/errors
some time ago and in it I want to know if an error already contains a stack trace. The goal is that if a large codebase uses different packages for errors, they should work together and not hide existing recorded information, like a stack trace.It seems this package does not expose the stack trace as
[]uintptr
but only as a formatted string?I would suggest that the following interface is implemented:
Then, it is easy to obtain a stack trace, use it, format it. To me it looks like a simple type cast should be enough to do so?
The text was updated successfully, but these errors were encountered: