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 ac0ebae commit 2f34d5fCopy full SHA for 2f34d5f
lib/assert.js
@@ -267,7 +267,7 @@ function getErrMessage(message, fn) {
267
Error.prepareStackTrace = tmpPrepare;
268
269
const filename = call.getFileName();
270
- const line = call.getLineNumber() - 1;
+ let line = call.getLineNumber() - 1;
271
let column = call.getColumnNumber() - 1;
272
let identifier;
273
let code;
@@ -287,6 +287,9 @@ function getErrMessage(message, fn) {
287
return message;
288
}
289
code = String(fn);
290
+ // For functions created with the Function constructor, V8 does not count
291
+ // the lines containing the function header.
292
+ line += 2;
293
identifier = `${code}${line}${column}`;
294
295
0 commit comments