cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason von Nieda <>
Subject Throwing from catch skips finally in Flowscript?
Date Tue, 31 Mar 2009 16:34:21 GMT
Hi all, I ran into an issue yesterday that seems to be pretty serious and
I'm having a hard time finding any information about it.
In JavaScript Flowscript using Cocoon 2.1.11 and
Rhino rhino1.5r4-continuations-R26.jar it seems that throwing an exception
from within a catch block causes an associated finally block to fail to
execute. Example:

function test()
try {
// this line runs"test1");
throw "moof";
catch (e) {
// this line runs"test2");
throw e;
finally {
// this line does not"test3");

In the example above, if I remove the throw e; from the catch block the
finally block runs fine. Additionally, if instead of using throw inside the
catch I just run some code that causes an exception to be thrown, the
finally also does not run.

This seems fairly glaring to me, as it makes it impossible to use a catch
and a finally at the same time.

Can someone tell me if this is a known bug in Cocoon, or Rhino, or something
else and if there is some information about it? I'm trying to decide how to
proceed in fixing thousands of lines of Flow.

Jason von Nieda

View raw message