From:  Ehsan Akhgari <>
Date:  28 Sep 2016 04:54:43 Hong Kong Time

Overriding Error constructors


I'd like to emulate the format of the V8's stack property on Error objects
in SpiderNode.  The approach that I have tried is to override the Error
(and its family types) constructors on the global object with my own which
reformats the stack to emulate the V8 format.

This works well for things such as |new Error('foo').stack|, but it doesn't
work for Errors generated by SpiderMonkey, since those are created through
ErrorObject::create() and as far as I can tell don't even look at the
constructor for the Error object on the global object.

Are there plans for changing this setup?