if i have to guess then the exception that is thrown when you create a
continuation is catched by the catch block?
(i guess that shouldnt happen because it should fall through everything)


On Mon, May 4, 2009 at 03:46, <[email protected]> wrote:

> I was trying to run test.js through Rhino's JS shell.
>
> java org.mozilla.javascript.tools.shell.Main -opt -2 test.js
>
> =========================
> test.js
> =========================
> main = function(){
>    try{
>        return f1();
>    }catch(e){}
> }
>
> f1 = function(){
>   var k = new Continuation();
>   k("result");
> }
> print(main());
> =========================
>
> I got the following error.
>
> Exception in thread "main" java.lang.IllegalStateException
>        at
> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:
> 3074)
>        at org.mozilla.javascript.InterpretedFunction.exec
> (InterpretedFunction.java:175)
>        at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:
> 564)
>        at org.mozilla.javascript.tools.shell.Main.processFileSecure
> (Main.java:486)
>        at
> org.mozilla.javascript.tools.shell.Main.processFile(Main.java:452)
>        at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:
> 443)
>        at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:
> 196)
>        at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:117)
>        at org.mozilla.javascript.Context.call(Context.java:515)
>        at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:
> 507)
>        at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179)
>        at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)
>
> However, if I remove the try-catch, it seems to work well.
>
> Does anybody know what's going on?
> _______________________________________________
> dev-tech-js-engine-rhino mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
>
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to