Do you want to request a feature or report a bug?
Bug
What is the current behavior?
A project I work on (in typescript) defines custom ES6 errors as such:
export class CustomError extends Error {
name = 'CustomError';
constructor(...args) {
super(...args);
Error.captureStackTrace(this, Error);
}
}
Now, throwing the custom error (throw new CustomError('my error message')) and inspecting the data sent (through dataCallback, we noticed that both data.culprit and the last frame in data.exception.values[0].stacktrace.frames both point to the filename CustomError my error message, with the file which throws the error being the second last entry in the stacktrace.
In comparison, throwing a standard error yields a data.culprit and last stacktrace frame both pointing to whichever file threw the error.
What is the expected behavior?
Custom errors should be handled the same way as standard errors. We believe the impact of this is that it prevents proper grouping of those custom errors, and we went around this by popping the last stacktrace frame and overriding the culprit in the dataCallback when this scenario is detected.
Using Raven.JS 3.22.1, installed through NPM.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
A project I work on (in typescript) defines custom ES6 errors as such:
Now, throwing the custom error (
throw new CustomError('my error message')) and inspecting the data sent (throughdataCallback, we noticed that bothdata.culpritand the last frame indata.exception.values[0].stacktrace.framesboth point to the filenameCustomError my error message, with the file which throws the error being the second last entry in the stacktrace.In comparison, throwing a standard error yields a
data.culpritand last stacktrace frame both pointing to whichever file threw the error.What is the expected behavior?
Custom errors should be handled the same way as standard errors. We believe the impact of this is that it prevents proper grouping of those custom errors, and we went around this by popping the last stacktrace frame and overriding the culprit in the
dataCallbackwhen this scenario is detected.Using Raven.JS 3.22.1, installed through NPM.