Ye olde arguments argument (was: Topic list - pending changes and issues for the ES3.1 spec)
mike.shaver at gmail.com
Fri Sep 19 06:18:16 PDT 2008
On Fri, Sep 19, 2008 at 12:26 AM, Garrett Smith <dhtmlkitchen at gmail.com> wrote:
> If a thrown native object did not already have a stack, what is the
> harm in adding one?
What should be done with a sealed object that's thrown?
I'm having trouble reconciling "all thrown objects should have .stack
thrust upon them, so that all thrown objects expose the site of the
error" with "but it's OK if that .stack property is really something
Having |throw "msg"| provide an exception which is not a primitive
string is a straight-out break of the language's semantics; I don't
think it's feasible at all. (Mozilla code throws naked numbers all
over the place, and I suspect would break quite spectacularly if it
got an Error object instead.)
More information about the Es-discuss