Subj : Re: JS Shell: throw {} To : netscape.public.mozilla.jseng From : Brendan Eich Date : Sun Dec 26 2004 02:31 pm Jens Thiele wrote: > Christian Biesinger schrieb: > >>Hi, >>I was playing around a bit with js shell... I noticed this: >>js> throw {} >>can't convert undefined to an integer >> >>Is this the expected result? I was expecting something along the lines >>of "uncaught exception: object", maybe even "uncaught exception: {}" >> >> >>A second issue: >>js> throw { toString: function() { return "foo" } } >>can't convert undefined to an integer > > > both work as expected with (debian package of) 1.5rc6a > > js> throw {} > uncaught exception: [object Object] > js> throw { toString: function() { return "foo" } } > uncaught exception: foo > js> > The trunk has regressed due to my attempts to fix https://bugzilla.mozilla.org/show_bug.cgi?id=243869. That bug is proving a pain to fix, and in fact it conflicts with the desired solution expressed in the initial comment of https://bugzilla.mozilla.org/show_bug.cgi?id=119719. I've opened https://bugzilla.mozilla.org/show_bug.cgi?id=276061 to track the regression. Thanks for reporting this, Christian! /be .