idea: try/catch and "rethrow"...?

Kris Kowal kris.kowal at
Tue Feb 1 11:02:34 PST 2011

In Narwhal, we wrote something like this:

var thrown = true;
try {
    // something done that might throw
    thrown = false;
} finally {
    if (thrown) {
        // exception observed but not caught

If I recall correctly, and I'm sure it's been noticed that I often
don't, this was necessary since we didn't want to baffle Rhino's
stack-trace. I don't think this would have been necessary on V8 since
stack traces are garnered by the Error constructor, not by decoration
at the point of throw.

This both illustrates that the feature is not necessary and that the
workaround is ugly.

Kris Kowal

More information about the es-discuss mailing list