Skip to content
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

CallerStackHandler does not work in tests or goroutines. #27

Closed
ChrisHines opened this issue Oct 18, 2014 · 2 comments
Closed

CallerStackHandler does not work in tests or goroutines. #27

ChrisHines opened this issue Oct 18, 2014 · 2 comments
Assignees

Comments

@ChrisHines
Copy link
Collaborator

The stack trimming logic only works correctly when the stack contains the main function.

@ChrisHines ChrisHines self-assigned this Oct 18, 2014
@ChrisHines
Copy link
Collaborator Author

@inconshreveable

Please review this fix. I would especially like you to consider the name of the new exported method in the stack package (stack.Trace.TrimRuntime). Can you think of a better name?

@inconshreveable
Copy link
Owner

Looks good to me. I think TrimRuntime is a great name for it. This also fixes cases with callbacks from the stdlib. (os.Signal, http.Serve, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants