From 89d6330bbedf84f2425bc4fe885e2a909bad4731 Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 6 Jan 2009 21:28:49 +0000 Subject: [PATCH] test unexpected (non-local) exceptions, too --- lib/as3/ok/finally.as | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/lib/as3/ok/finally.as b/lib/as3/ok/finally.as index 6878020..d45d49c 100644 --- a/lib/as3/ok/finally.as +++ b/lib/as3/ok/finally.as @@ -7,7 +7,7 @@ package { return; trace("error"); } finally { - trace("ok 1/8"); + trace("ok 1/9"); } trace("error"); } @@ -18,7 +18,7 @@ package { break; trace("error"); } finally { - trace("ok 2/8"); + trace("ok 2/9"); } trace("error"); } while(true); @@ -28,7 +28,7 @@ package { try { var x = 1+1; } finally { - trace("ok 3/8"); + trace("ok 3/9"); } } @@ -38,11 +38,11 @@ package { throw new Error(); trace("error"); } finally { - trace("ok 4/8"); + trace("ok 4/9"); } trace("error"); } catch(e:Error) { - trace("ok 5/8"); + trace("ok 5/9"); } } @@ -57,22 +57,30 @@ package { x*=2; } if(x==2) - trace("ok 6/8"); + trace("ok 6/9"); } - function fail() { + function fail1() { try { throw new Error(); } finally { - trace("ok 7/8"); + trace("ok 7/9"); + } + } + + function fail2() { + try { + fail1(); + } finally { + trace("ok 8/9"); } } function test_exception3() { try { - fail(); + fail2(); } catch(e:Error) { - trace("ok 8/8"); + trace("ok 9/9"); } } -- 1.7.10.4