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

Error.captureStackTrace is not a function in firefox #224

Open
olsonpm opened this issue Feb 5, 2015 · 3 comments
Open

Error.captureStackTrace is not a function in firefox #224

olsonpm opened this issue Feb 5, 2015 · 3 comments

Comments

@olsonpm
Copy link

olsonpm commented Feb 5, 2015

Erraneous code:

https://github.com/trentm/node-bunyan/blob/master/lib/bunyan.js#L143

I didn't take the time to check out what captureStackTrace does exactly to find if any other code depended on it. In my fork I'm just wrapping it which seems to work fine:

if (typeof Error.captureStackTrace === 'function') {
  // capture the stack
}

Again, firefox 35.0.1 on ubuntu 14.10

@ShayMatasaro
Copy link

still seeing it on FF 45.0

@fahad19
Copy link

fahad19 commented Jan 9, 2017

ended up here while dealing with Firefox issue, since it doesn't have Error.captureStackTrace.

Error().stack works universally.

@rajan-gupta-12
Copy link

WOW, I tried the below approach and it worked for me :)

  1. Run npm i error-polyfill
  2. Add import "error-polyfill" to the index.tsx / app.tsx ( main loading file of application )

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

No branches or pull requests

5 participants