Try embedding the ` ... ^` lines inside the `SyntaxError` (or any other
native error) object before giving up and printing them to the stderr.
fix #6920
fix #1310
So instead of:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
You will now see:
path/to/foo.js:1
throw new Error('bar');
^
This is a sub-set of isaacs patch here:
https://github.com/joyent/node/issues/3235
The difference is that this patch purely adresses the exception output,
but does not try to make any behavior changes / improvements.
This patch now reports the proper throw call site for exceptions
triggered within process.nextTick. So instead of this:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
You will now see:
mydir/myscript.js:15
throw new Error('My Error');
^
From my testing this patch causes no performance regressions, but does
greatly simplify processing the nextTickQueue.
V8 3.4.12.1 changed exception log format.
3.14.10:
node.js:189
throw e; // process.nextTick error, or 'error' event on first tick
^
3.4.12.1:
node.js:189
throw e; // process.nextTick error, or 'error' event on first tick
^
The caret was moved.