We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0df4910 commit b4e8f0dCopy full SHA for b4e8f0d
lib/assert.js
@@ -268,7 +268,7 @@ function getErrMessage(message, fn) {
268
const call = err.stack[0];
269
270
const filename = call.getFileName();
271
- const line = call.getLineNumber() - 1;
+ let line = call.getLineNumber() - 1;
272
let column = call.getColumnNumber() - 1;
273
let identifier;
274
let code;
@@ -288,6 +288,9 @@ function getErrMessage(message, fn) {
288
return message;
289
}
290
code = String(fn);
291
+ // For functions created with the Function constructor, V8 does not count
292
+ // the lines containing the function header.
293
+ line += 2;
294
identifier = `${code}${line}${column}`;
295
296
0 commit comments