repl: attach location info to syntax errors
authorcjihrig <cjihrig@gmail.com>
Wed, 25 Nov 2015 00:55:51 +0000 (19:55 -0500)
committerMyles Borins <mborins@us.ibm.com>
Tue, 19 Jan 2016 19:52:29 +0000 (11:52 -0800)
commit93afc39d4ab8bd0bb70bebbc718035d7852047e8
tree08d5f4a0b539caa6da1e23501cbecb876268bd8a
parent422a865d467e19c7b1b24ab94f0ebce2fce2dddc
repl: attach location info to syntax errors

Currently, when a file with a syntax error is imported in the
REPL, no information is provided on the error's location. This
commit adds the error's location to the stack trace.

Refs: https://github.com/nodejs/node/issues/2762
Refs: https://github.com/nodejs/node/issues/3411
Refs: https://github.com/nodejs/node/issues/3784
PR-URL: https://github.com/nodejs/node/pull/4013
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
lib/repl.js
test/parallel/test-repl-syntax-error-stack.js [new file with mode: 0644]