{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/7578","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/7578/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/7578/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/7578/events","html_url":"https://github.com/nodejs/node/issues/7578","id":164231374,"number":7578,"title":"error miss filename and line number in 4.x and 5.x when require file compile error","user":{"login":"dead-horse","id":985607,"avatar_url":"https://avatars.githubusercontent.com/u/985607?v=3","gravatar_id":"","url":"https://api.github.com/users/dead-horse","html_url":"https://github.com/dead-horse","followers_url":"https://api.github.com/users/dead-horse/followers","following_url":"https://api.github.com/users/dead-horse/following{/other_user}","gists_url":"https://api.github.com/users/dead-horse/gists{/gist_id}","starred_url":"https://api.github.com/users/dead-horse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dead-horse/subscriptions","organizations_url":"https://api.github.com/users/dead-horse/orgs","repos_url":"https://api.github.com/users/dead-horse/repos","events_url":"https://api.github.com/users/dead-horse/events{/privacy}","received_events_url":"https://api.github.com/users/dead-horse/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/error-handling","name":"error-handling","color":"e11d21"},{"url":"https://api.github.com/repos/nodejs/node/labels/module","name":"module","color":"fbca04"},{"url":"https://api.github.com/repos/nodejs/node/labels/v4.x","name":"v4.x","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-07T05:18:10Z","updated_at":"2016-07-07T06:24:13Z","closed_at":null,"body":"<!--\r\nThank you for reporting an issue.\r\nPlease fill in as much of the template below as you're able.\r\n\r\nVersion: output of `node -v`\r\nPlatform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)\r\nSubsystem: if known, please specify affected core module name\r\n\r\nIf possible, please provide code that demonstrates the problem, keeping it as\r\nsimple and free of external dependencies as you are able.\r\n-->\r\n\r\n* **Version**: 4.4.7 and 5.12.0\r\n* **Platform**: osx\r\n\r\n<!-- Enter your issue details below this comment. -->\r\n\r\nwhen require a file within a syntax error, the error file name and line number won't set into `err.message`, but this is fixed in node 6. will we land this fix in node@4 ?\r\n\r\n```\r\n// t.js\r\ntry {\r\n  require('./r.js')\r\n} catch (err) {\r\n  console.log(err.stack)\r\n}\r\n\r\n// r.js\r\nfunction // syntax error\r\n```\r\n\r\nin 4 and 5, `err.stack` will be:\r\n\r\n```\r\nSyntaxError: Unexpected token }\r\n    at exports.runInThisContext (vm.js:53:16)\r\n    at Module._compile (module.js:387:25)\r\n    at Object.Module._extensions..js (module.js:422:10)\r\n    at Module.load (module.js:357:32)\r\n    at Function.Module._load (module.js:314:12)\r\n    at Module.require (module.js:367:17)\r\n    at require (internal/module.js:16:19)\r\n    at Object.<anonymous> (/Users/deadhorse/git/basement/t.js:2:3)\r\n    at Module._compile (module.js:413:34)\r\n    at Object.Module._extensions..js (module.js:422:10)\r\n```\r\n\r\nin 0.12 and 6, `err.stack` will be:\r\n\r\n```\r\n/Users/deadhorse/git/basement/r.js:3\r\n});\r\n^\r\nSyntaxError: Unexpected token }\r\n    at Object.exports.runInThisContext (vm.js:53:16)\r\n    at Module._compile (module.js:513:28)\r\n    at Object.Module._extensions..js (module.js:550:10)\r\n    at Module.load (module.js:458:32)\r\n    at tryModuleLoad (module.js:417:12)\r\n    at Function.Module._load (module.js:409:3)\r\n    at Module.require (module.js:468:17)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (/Users/deadhorse/git/basement/t.js:2:3)\r\n    at Module._compile (module.js:541:32)\r\n```"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/230989374","html_url":"https://github.com/nodejs/node/issues/7578#issuecomment-230989374","issue_url":"https://api.github.com/repos/nodejs/node/issues/7578","id":230989374,"user":{"login":"rvagg","id":495647,"avatar_url":"https://avatars.githubusercontent.com/u/495647?v=3","gravatar_id":"","url":"https://api.github.com/users/rvagg","html_url":"https://github.com/rvagg","followers_url":"https://api.github.com/users/rvagg/followers","following_url":"https://api.github.com/users/rvagg/following{/other_user}","gists_url":"https://api.github.com/users/rvagg/gists{/gist_id}","starred_url":"https://api.github.com/users/rvagg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvagg/subscriptions","organizations_url":"https://api.github.com/users/rvagg/orgs","repos_url":"https://api.github.com/users/rvagg/repos","events_url":"https://api.github.com/users/rvagg/events{/privacy}","received_events_url":"https://api.github.com/users/rvagg/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T06:24:13Z","updated_at":"2016-07-07T06:24:13Z","body":"Oh, no it's not from V8 is it, it's the bit with the filename isn't it? @mscdex do you know the commit here that changed this?"}}
{"actor":{"display_login":"rvagg"}}