| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6a17aec commit 5bd6947
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -268,7 +268,7 @@ function getErrMessage(message, fn) { | |||
| 268 | 268 | const call = err.stack[0]; | |
| 269 | 269 | ||
| 270 | 270 | const filename = call.getFileName(); | |
| 271 | - const line = call.getLineNumber() - 1; | ||
| 271 | + let line = call.getLineNumber() - 1; | ||
| 272 | 272 | let column = call.getColumnNumber() - 1; | |
| 273 | 273 | let identifier; | |
| 274 | 274 | let code; | |
@@ -288,6 +288,9 @@ function getErrMessage(message, fn) { | |||
| 288 | 288 | return message; | |
| 289 | 289 | } | |
| 290 | 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; | ||
| 291 | 294 | identifier = `${code}${line}${column}`; | |
| 292 | 295 | } | |
| 293 | 296 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments