On Fri, Sep 19, 2008 at 6:18 AM, Mike Shaver <[EMAIL PROTECTED]> wrote: > On Fri, Sep 19, 2008 at 12:26 AM, Garrett Smith <[EMAIL PROTECTED]> 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? >
In EcmaScript, there is [[CanPut]]. 5. call [[CanPut]] on THROWN with argument "stack" 6. if Result(5) is false, go to step 11. ... 11. Return (throw, THROWN, empty). > 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 > else". > I do not understand what you mean. What is the "something else"? If the stack property exists, it would be a string. What else could it be? > 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.) > I see. Thank you, Garrett > Mike > _______________________________________________ Es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

