module: add filename to require() json errors
authorTJ Holowaychuk <tj@vision-media.ca>
Fri, 6 Jul 2012 22:26:41 +0000 (15:26 -0700)
committerNathan Rajlich <nathan@tootallnate.net>
Fri, 6 Jul 2012 22:26:41 +0000 (15:26 -0700)
commited7fb149a20ee5e7aa9a0574a242a193d7acd761
tree78ba103e9fdfde9d751e9a0039feae4d1c928958
parent0dba28b5c29201a026a86e1d73b3c3c88a163b7d
module: add filename to require() json errors

Otherwise it can be quite difficult to figure out which file is busted.

Closes #3580.
lib/module.js
test/fixtures/invalid.json [new file with mode: 0644]
test/simple/test-require-json.js [new file with mode: 0644]