Conditional catch clause

David Herman dherman at mozilla.com
Thu Dec 20 16:40:40 PST 2012


On Dec 20, 2012, at 2:47 PM, John J Barton <johnjbarton at johnjbarton.com> wrote:

> A lot of real code throws strings, for example from WebInspector:
> throw "invalid color format";
> Thus I suggest assuming that thrown objects are ErrorExceptions unless the standard (eg StopIterator) or developer marks them isNotErrorException.

This kind of fuzzy heuristic doesn't belong in a stdlib.

Dave



More information about the es-discuss mailing list