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

feat(node): Use util.inspect() before printing non-errors #696

Merged
merged 2 commits into from
Jan 21, 2020

Conversation

bengourley
Copy link
Contributor

@bengourley bengourley commented Jan 6, 2020

throw { ... } or reject({ ... }) is bad practice, but sometimes it happens. Previously (as
highlighted in #597), Bugsnag would just print [object Object], which is unhelpful. This
uses util.inspect() to get a better textual representation of anything that doesn't have
a .stack property, before logging it to the console.

Partially fixes #597 (work on the v7 branch addresses the part that affects the error report).

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Jan 6, 2020

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 40.97 kB 12.27 kB
After 40.97 kB 12.27 kB
± No change No change

Generated by 🚫 dangerJS against d82dc80

@bengourley bengourley marked this pull request as ready for review January 7, 2020 10:54
throw { ... } or reject({ ... }) is bad practice, but sometimes it happens. Previously (as
highlighted in #597), Bugsnag would just print [object Object], which is unhelpful. This
uses util.inspect() to get a better textual representation of anything that doesn't have
a .stack property, before logging it to the console.

Parially fixes #597
@bengourley
Copy link
Contributor Author

Rebased against next and added changelog.

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

Successfully merging this pull request may close these issues.

3 participants