mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-19 08:22:12 +00:00
Fixed: Try..catch.finally vs loops
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -16,7 +16,7 @@
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::timeStamp</name>
|
||||
<value>'31.01.2021'</value>
|
||||
<value>'02.02.2021'</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::air</name>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::timeStamp</name>
|
||||
<value>'31.01.2021'</value>
|
||||
<value>'02.02.2021'</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::air</name>
|
||||
|
||||
@@ -12,6 +12,8 @@ package
|
||||
{
|
||||
TestTryCatch;
|
||||
TestTryCatchIfInTry;
|
||||
TestTryCatchInWhile;
|
||||
TestTryCatchInWhile2;
|
||||
TestTryCatchLoop;
|
||||
TestTryCatchExceptionUsage
|
||||
TestTryFinally;
|
||||
|
||||
41
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatchInWhile.as
vendored
Normal file
41
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatchInWhile.as
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
package tests
|
||||
{
|
||||
import flash.errors.EOFError;
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryCatchInWhile
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
trace("before loop");
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
while (true)
|
||||
{
|
||||
trace("a");
|
||||
}
|
||||
//not reachable in ASC2
|
||||
//trace("after inner while");
|
||||
}
|
||||
catch (e:EOFError)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//not reachable in ASC2:
|
||||
//trace("after loop");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
48
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatchInWhile2.as
vendored
Normal file
48
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatchInWhile2.as
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
package tests
|
||||
{
|
||||
import flash.errors.EOFError;
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryCatchInWhile2
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
var a:int;
|
||||
a = 0;
|
||||
trace("before loop");
|
||||
while (a > 5)
|
||||
{
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
if (a == 6){
|
||||
continue;
|
||||
}
|
||||
if (a == 7){
|
||||
break;
|
||||
}
|
||||
trace("after inner while");
|
||||
}
|
||||
catch (e:EOFError)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
if (a == 8){
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
a++;
|
||||
}
|
||||
//not reachable in ASC2:
|
||||
//trace("after loop");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user