On Tue, Feb 1, 2011 at 10:53 AM, Kyle Simpson <[email protected]> wrote:
> ?I have something that annoys me about how JavaScript try/catch error
> handling currently works. Don't get me wrong, I totally understand why it
> works that way, and it makes sense. But having the option to get around that
> behavior would be really nice.

I believe that catchguards have been accepted as Harmonious.
Spidermonkey has had them since the ES3 days, but they weren't
standardized due to making things too hard for someone's debugger.

try {
  throw 5;
} catch (e if e == 4) { // not caught
   four(e);
}

try {
  throw 5;
} catch (e if e == 4) {
  four(e);
} catch {  // fallback
  other(e);
}

Mike
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to