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

Smarter notify stacktrace #100

Merged
merged 2 commits into from Oct 17, 2017

Conversation

Projects
None yet
3 participants
@sorentwo
Contributor

sorentwo commented Oct 16, 2017

When Honeybadger.notify/1|2 is called from within a try expression the exception stacktrace as provided by System.stacktrace/0 is available. When System.stacktrace/0 is called outside of a try expression it simply returns [], and we can fall back to using Process.info/2 to generate a messier stacktrace.

Because the notify function is typically used within a try expression this provides much better default stacktraces.

Inspired by #99

@minhajuddin

This PR looks great! Thanks 👍

sorentwo added some commits Oct 16, 2017

Generate smarter stacktraces from custom notify
When `Honeybadger.notify/1|2` is called from within a `try` expression
the exception stacktrace as provided by `System.stacktrace/0` is
available. When `System.stacktrace/0` is called _outside_ of a `try`
expression it simply returns `[]`, and we can fall back to using
`Process.info/2` to generate a messier stacktrace.

Because the `notify` function is typically used within a `try`
expression this provides much better default stacktraces.

Closes #99

@joshuap joshuap merged commit f78aeaa into honeybadger-io:master Oct 17, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment