atom / exception-reporting

Catches exceptions and forwards them to bugsnag
MIT License
10 stars 19 forks source link

Include messages of previous exceptions in reported metadata #30

Closed nathansobo closed 7 years ago

nathansobo commented 7 years ago

If an exception occurs in Atom, any subsequent interaction is fairly suspect because the code path in which the previous exception occurred didn't terminate cleanly, potentially leaving us in an invalid state. It's important that we know whether a given exception occurred after some other exception to ensure we focus on the root cause of an issue rather than random downstream consequences.

This PR adds the messages associated with previous errors and assertion failures to the metadata of every error. This should occur as a tab in bug snag containing a list. I'm not adding the full stack traces because I'm worried about bugsnag rejecting our metadata for being too large. This should at least give us a sense of what's going on however.

This PR also refactors reporter to be a proper class rather than a bunch of free functions so it's easier to test.

bugsnag

/cc @ungb @maxbrunsfeld