| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1676502 commit 5981fb7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -269,7 +269,7 @@ function getErrMessage(message, fn) { | |||
| 269 | 269 | const call = err.stack[0]; | |
| 270 | 270 | ||
| 271 | 271 | const filename = call.getFileName(); | |
| 272 | - const line = call.getLineNumber() - 1; | ||
| 272 | + let line = call.getLineNumber() - 1; | ||
| 273 | 273 | let column = call.getColumnNumber() - 1; | |
| 274 | 274 | let identifier; | |
| 275 | 275 | let code; | |
@@ -289,6 +289,9 @@ function getErrMessage(message, fn) { | |||
| 289 | 289 | return message; | |
| 290 | 290 | } | |
| 291 | 291 | code = String(fn); | |
| 292 | + // For functions created with the Function constructor, V8 does not count | ||
| 293 | + // the lines containing the function header. | ||
| 294 | + line += 2; | ||
| 292 | 295 | identifier = `${code}${line}${column}`; | |
| 293 | 296 | } | |
| 294 | 297 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments