[Laszlo-dev] Is this compiled code for a method, in debug, mode, correct?
André Bargull
andre.bargull at udo.edu
Mon Sep 21 12:11:31 PDT 2009
The error is only discarded if "catcherrors" is enabled (and the
"throwsError" pragma isn't used).
> I was looking at the as3 generated code for an onclick handler which came
> from this source code
>
> <button onclick="canvas.test(1)">click me </button>
>
> It looks like this, when compiled in debug mode
>
> public function $lzc$handle_onclick$$args$2Elzx_11_41_$m492 ($lzc$ignore_$1)
> {
> try {
> canvas.test(1);
> }
> catch ($lzsc$e) {
> if ($lzsc$e is Error) {
> if (lz["$lzsc$thrownError"] === $lzsc$e) {
> throw $lzsc$e;
> };
> $lzsc$runtime.reportException("args.lzx", 11, $lzsc$e);
> };
> throw $lzsc$e;
> }
> }
>
> If some error is thrown in the call to "test", this wrapper looks like it
> will always catch and then
> rethrow it. Is this the expected behavior? I sort of thought we were going
> to catch and report the error
> to our debugger, and then discard it rather than rethrowing it, in this case
> (debugger on)?
>
> --
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com <http://www.openlaszlo.org/mailman/listinfo/laszlo-dev>
>
More information about the Laszlo-dev
mailing list