diff options
author | Felix Geisendörfer <felix@debuggable.com> | 2012-05-08 22:02:28 +0200 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-05-09 11:54:43 -0700 |
commit | bf9d8e9214e2098bacf18416564dc3a91bcdf5d6 (patch) | |
tree | dd3f2baf0410892d8fd5181ce0fb03b6435dde77 /test/message | |
parent | 814033365b146afb095fad6c2c05d0da0237615f (diff) | |
download | android-node-v8-bf9d8e9214e2098bacf18416564dc3a91bcdf5d6.tar.gz android-node-v8-bf9d8e9214e2098bacf18416564dc3a91bcdf5d6.tar.bz2 android-node-v8-bf9d8e9214e2098bacf18416564dc3a91bcdf5d6.zip |
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.
Diffstat (limited to 'test/message')
-rw-r--r-- | test/message/stack_overflow.out | 6 | ||||
-rw-r--r-- | test/message/throw_custom_error.out | 6 | ||||
-rw-r--r-- | test/message/throw_non_error.out | 6 | ||||
-rw-r--r-- | test/message/undefined_reference_in_new_context.out | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/test/message/stack_overflow.out b/test/message/stack_overflow.out index 1b6971da32..72dc019ff1 100644 --- a/test/message/stack_overflow.out +++ b/test/message/stack_overflow.out @@ -1,6 +1,6 @@ before -module.js:311 - throw err; - ^ +*test*message*stack_overflow.js:31 +function stackOverflow() { + ^ RangeError: Maximum call stack size exceeded diff --git a/test/message/throw_custom_error.out b/test/message/throw_custom_error.out index b5fd92b425..1406226d7d 100644 --- a/test/message/throw_custom_error.out +++ b/test/message/throw_custom_error.out @@ -1,6 +1,6 @@ before -module.js:311 - throw err; - ^ +*test*message*throw_custom_error.js:31 +throw { name: 'MyCustomError', message: 'This is a custom message' }; +^ MyCustomError: This is a custom message diff --git a/test/message/throw_non_error.out b/test/message/throw_non_error.out index 255e5e4d54..f0717c63c2 100644 --- a/test/message/throw_non_error.out +++ b/test/message/throw_non_error.out @@ -1,6 +1,6 @@ before -module.js:311 - throw err; - ^ +*/test/message/throw_non_error.js:31 +throw { foo: 'bar' }; +^ [object Object] diff --git a/test/message/undefined_reference_in_new_context.out b/test/message/undefined_reference_in_new_context.out index 1e6a2d31d1..d6e9011554 100644 --- a/test/message/undefined_reference_in_new_context.out +++ b/test/message/undefined_reference_in_new_context.out @@ -1,8 +1,8 @@ before -module.js:311 - throw err; - ^ +*test*message*undefined_reference_in_new_context.js:34 +script.runInNewContext(); + ^ ReferenceError: foo is not defined at evalmachine.<anonymous>:* at Object.<anonymous> (*test*message*undefined_reference_in_new_context.js:*) |