mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-08 10:58:12 +00:00
try..catch break detection fix
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -17,6 +17,7 @@ package
|
||||
TestTryCatchInWhile2;
|
||||
TestTryCatchInWhile3;
|
||||
TestTryCatchInWhile4;
|
||||
TestTryCatchInWhile5;
|
||||
TestTryCatchLoop;
|
||||
TestTryCatchLoopBreak;
|
||||
TestTryCatchExceptionUsage
|
||||
|
||||
@@ -12,20 +12,20 @@ package tests
|
||||
{
|
||||
var a:int;
|
||||
a = 0;
|
||||
trace("before loop"); //1-17
|
||||
while (a > 5) //44-47
|
||||
trace("before loop");
|
||||
while (a > 5)
|
||||
{
|
||||
try
|
||||
{
|
||||
return "intry return"; //20-23
|
||||
return "intry return";
|
||||
}
|
||||
catch(e:Error)
|
||||
{
|
||||
trace("in catch"); //26-43
|
||||
trace("in catch");
|
||||
}
|
||||
a++; //26-43 cont.
|
||||
a++;
|
||||
}
|
||||
return "OK";//48-50
|
||||
return "OK";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package tests
|
||||
|
||||
try
|
||||
{
|
||||
trace("try2"); //12-21
|
||||
trace("try2");
|
||||
if (a == 10){
|
||||
trace("br");
|
||||
break;
|
||||
@@ -29,7 +29,7 @@ package tests
|
||||
}
|
||||
trace("a=" + a);
|
||||
}
|
||||
trace("after"); //61-66
|
||||
trace("after");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
36
libsrc/ffdec_lib/testdata/as3_cross_compile/src/tests/TestTryCatchInWhile5.as
vendored
Normal file
36
libsrc/ffdec_lib/testdata/as3_cross_compile/src/tests/TestTryCatchInWhile5.as
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryCatchInWhile5
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
var i:int;
|
||||
i = 0;
|
||||
var j:int;
|
||||
j = 5;
|
||||
while(i < 10)
|
||||
{
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
if (j > 4) {
|
||||
throw new Error("Problem: "+e);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
trace("after");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user