Fix exception output for module load exceptions
authorFelix Geisendörfer <felix@debuggable.com>
Tue, 8 May 2012 20:02:28 +0000 (22:02 +0200)
committerisaacs <i@izs.me>
Wed, 9 May 2012 18:54:43 +0000 (11:54 -0700)
commitbf9d8e9214e2098bacf18416564dc3a91bcdf5d6
treedd3f2baf0410892d8fd5181ce0fb03b6435dde77
parent814033365b146afb095fad6c2c05d0da0237615f
Fix exception output for module load exceptions

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.
lib/module.js
test/message/stack_overflow.out
test/message/throw_custom_error.out
test/message/throw_non_error.out
test/message/undefined_reference_in_new_context.out