jerakeen.org

by Tom Insam

notes☴

code☷

links☲

photos☵

New in Rhino 1.6R6 - MDC

New in Rhino 1.6R6 - MDC

created 01 August 2007 in links tagged javascript, release, rhino and strict.

oooh, strict mode for JavaScript. And Rhino is catching up with all the nifty SpiderMonkey stuff I like. Still no deconstructed assignment, though.

http://developer.mozilla.org/en/docs/New_in_Rhino_1.6R6

Optional catch in JavaScript

created 26 July 2007 in blog tagged exceptions, javascript, programming, rhino and spidermonkey.

One of the things that’s been annoying me about JavaScript recently is the inability to only catch certain classes of exception, as in Java or Python, for instance. The try {..} catch(e) {..} block has always seemed too inclusive. But recently Ash found a crazy syntax in SpiderMonkey that lets us only catch certain exceptions.

try {
  // something that can throw
} catch(e if e.bar == 'foo') {
  // an error is only caught here if it has a 'bar' property of 'foo'
} catch(e if e.bar == 'baz') {
  // there can be different catches for different conditions
} catch (e) {
  // otherwise it's caught here. Without this block, the error would fall
  // through the 'try' and be re-thrown.
}

I haven’t bothered testing this in Internet Explorer (or any other web browser for that matter), because I’m only interested in server-side JavaScript execution at the moment. It works in at least recent SpiderMonkey CVS and Rhino 1.6r6, not sure about earlier versions.

Open Rhino Bugs

Open Rhino Bugs

created 07 August 2006 in links tagged bugs and rhino.

the rhino bugzilla

https://bugzilla.mozilla.org/buglist.cgi?query_format=spe...

Google Groups: mozilla.dev.tech.js-engine

Google Groups: mozilla.dev.tech.js-engine

created 07 August 2006 in links tagged javascript, rhino and spidermonkey.

This is, apparently, where the real mozilla spidermonkey/rhino mailing list lives, as opposed to merely the one linked from the ‘help’ page as being the official one. Nice.

http://groups.google.com/group/mozilla.dev.tech.js-engine...