Handle frames generated by Firefox internal errors (e.g. NS_ERROR_FAILURE)
benvinegar opened this issue · comments
It's possible to get Firefox to generate errors that bubble up from its internals. They can generate bizarre stack trace formats that are not currently handled by TraceKit.
More here: https://developer.mozilla.org/en-US/docs/Mozilla/Errors
Example error.stack
from such an error, generated by try/catch
around w/ XMLHttpRequest.prototype.send
that fails in a specific situation:
[2]</Raven.prototype._wrapBuiltIns/</<@http://127.0.0.1:8002/dist/raven.js:703:28
App.prototype.foo@file:///Users/benvinegar/Projects/sentry/index.html:15:2
bar@file:///Users/benvinegar/Projects/sentry/index.html:20:3
@file:///Users/benvinegar/Projects/sentry/index.html:23:1
TraceKit parses the first frame into:
{
url: "[2]</Raven.prototype._wrapBuiltIns/</<@http://127.0.0.1:8002/dist/raven.js",
func: "?",
args: [],
line: 703,
column: 28
}
More info on how I generated this error in getsentry/sentry-javascript#528
@benvinegar would you mind submitting a test and patch for this and we'll get this pushed asap.
@benvinegar were you able to take a look into this?
I'll take a stab this week.
Test added in #50
Oh I guess I should fix it too ... ^_^