diff --git a/ets2panda/test/ast/compiler/ets/throwInFinallyBlock.ets b/ets2panda/test/ast/compiler/ets/throwInFinallyBlock.ets index 2bb53db77eab4763747c63a019afb22ce2c763a1..d75a72da751d60e0feef688b2406129d0bcecb33 100644 --- a/ets2panda/test/ast/compiler/ets/throwInFinallyBlock.ets +++ b/ets2panda/test/ast/compiler/ets/throwInFinallyBlock.ets @@ -16,10 +16,10 @@ function main(): void { try { try { - throw new Exception(); + throw new Error(); } catch (e) {} finally /* @@ label */{ - throw new Exception(); + throw new Error(); } } catch (e) {} } diff --git a/ets2panda/test/ast/compiler/ets/tryCatchMissingParam.ets b/ets2panda/test/ast/compiler/ets/tryCatchMissingParam.ets index b2f1731f602830064845198374938f2c00396ab7..ed8c64227c6b3e19dffa09802871e70a57438c44 100644 --- a/ets2panda/test/ast/compiler/ets/tryCatchMissingParam.ets +++ b/ets2panda/test/ast/compiler/ets/tryCatchMissingParam.ets @@ -15,7 +15,7 @@ function main(): void { try { - throw new Exception(); + throw new Error(); } catch (/* @@ label */^) { //Do something. } diff --git a/ets2panda/test/ast/parser/ets/FixedArray/MultipleParserErrors.ets b/ets2panda/test/ast/parser/ets/FixedArray/MultipleParserErrors.ets index 93e45d54543314685369023f1f128998e3034dae..4b647af6a8464a13a0f8fc8a66329c457f7c0786 100644 --- a/ets2panda/test/ast/parser/ets/FixedArray/MultipleParserErrors.ets +++ b/ets2panda/test/ast/parser/ets/FixedArray/MultipleParserErrors.ets @@ -128,12 +128,12 @@ declare function addResult(): number; function main(): void { try { - throw new Exception(); + throw new Error(); } catch () { //Do something. } try { - throw new Exception(); + throw new Error(); } catch (e = 0) { //Do something. } diff --git a/ets2panda/test/ast/parser/ets/MultipleParserErrors.ets b/ets2panda/test/ast/parser/ets/MultipleParserErrors.ets index f5ca1c97b2936862f7841f75784a26ef28dd11b3..257ff2bd18f6d3494ee020147d6c318bb66eeab7 100644 --- a/ets2panda/test/ast/parser/ets/MultipleParserErrors.ets +++ b/ets2panda/test/ast/parser/ets/MultipleParserErrors.ets @@ -128,12 +128,12 @@ declare function addResult(): number; function main(): void { try { - throw new Exception(); + throw new Error(); } catch () { //Do something. } try { - throw new Exception(); + throw new Error(); } catch (e = 0) { //Do something. } diff --git a/ets2panda/test/compiler/ets/catch-soft-keyword-expected.txt b/ets2panda/test/compiler/ets/catch-soft-keyword-expected.txt index 399704b9aa35cd712bafe73314e772130d085305..689d8a583f8d3fba32b086ad002181cd12e51170 100644 --- a/ets2panda/test/compiler/ets/catch-soft-keyword-expected.txt +++ b/ets2panda/test/compiler/ets/catch-soft-keyword-expected.txt @@ -718,7 +718,7 @@ "loc": { "start": { "line": 26, - "column": 30, + "column": 26, "program": "catch-soft-keyword.ets" }, "end": { @@ -737,7 +737,7 @@ "type": "ETSTypeReferencePart", "name": { "type": "Identifier", - "name": "Exception", + "name": "Error", "loc": { "start": { "line": 26, @@ -746,7 +746,7 @@ }, "end": { "line": 26, - "column": 28, + "column": 24, "program": "catch-soft-keyword.ets" } } @@ -759,7 +759,7 @@ }, "end": { "line": 26, - "column": 28, + "column": 24, "program": "catch-soft-keyword.ets" } } @@ -772,7 +772,7 @@ }, "end": { "line": 26, - "column": 28, + "column": 24, "program": "catch-soft-keyword.ets" } } diff --git a/ets2panda/test/compiler/ets/catch-soft-keyword.ets b/ets2panda/test/compiler/ets/catch-soft-keyword.ets index 4b9a3fce73cd5ff25b31e26d6cf3c2d053457bc5..343d46f5630b157b22c811b5aab8b8372edfeb87 100644 --- a/ets2panda/test/compiler/ets/catch-soft-keyword.ets +++ b/ets2panda/test/compiler/ets/catch-soft-keyword.ets @@ -23,6 +23,6 @@ class cls { function foo(): void { let catch: int = 5; try { - } catch (catch: Exception) { + } catch (catch: Error) { } } diff --git a/ets2panda/test/compiler/ets/catchParamScope-expected.txt b/ets2panda/test/compiler/ets/catchParamScope-expected.txt index b1b53cb272f8d2fb8a5dc3d9b7c1a87b5f5bf4bc..5ef16e9c33c9c536f8a397d253550bcd76cda147 100644 --- a/ets2panda/test/compiler/ets/catchParamScope-expected.txt +++ b/ets2panda/test/compiler/ets/catchParamScope-expected.txt @@ -456,7 +456,7 @@ "loc": { "start": { "line": 22, - "column": 36, + "column": 32, "program": "catchParamScope.ets" }, "end": { @@ -475,7 +475,7 @@ "type": "ETSTypeReferencePart", "name": { "type": "Identifier", - "name": "Exception", + "name": "Error", "loc": { "start": { "line": 22, @@ -484,7 +484,7 @@ }, "end": { "line": 22, - "column": 34, + "column": 30, "program": "catchParamScope.ets" } } @@ -497,7 +497,7 @@ }, "end": { "line": 22, - "column": 34, + "column": 30, "program": "catchParamScope.ets" } } @@ -510,7 +510,7 @@ }, "end": { "line": 22, - "column": 34, + "column": 30, "program": "catchParamScope.ets" } } diff --git a/ets2panda/test/compiler/ets/catchParamScope.ets b/ets2panda/test/compiler/ets/catchParamScope.ets index c5e1ac85c487fa5ce7d28589e132ddadc6023319..0d7fee1ee8ce9aaead14948c45c3d5e35d6fbef8 100644 --- a/ets2panda/test/compiler/ets/catchParamScope.ets +++ b/ets2panda/test/compiler/ets/catchParamScope.ets @@ -19,7 +19,7 @@ function reject(error: Object): void { function main(): void { let fn: () => void = (): void => { try { - } catch (error: Exception) { + } catch (error: Error) { reject(error); } } diff --git a/ets2panda/test/compiler/ets/throwInCatchClause3-expected.txt b/ets2panda/test/compiler/ets/throwInCatchClause3-expected.txt index e132c149360f8cbeda8b0e3d2f3d51ee86c83c69..597a6e41a6d0c480f00538b13d56ea490b589114 100644 --- a/ets2panda/test/compiler/ets/throwInCatchClause3-expected.txt +++ b/ets2panda/test/compiler/ets/throwInCatchClause3-expected.txt @@ -211,7 +211,7 @@ "type": "ETSTypeReferencePart", "name": { "type": "Identifier", - "name": "Exception", + "name": "Error", "loc": { "start": { "line": 19, @@ -220,7 +220,7 @@ }, "end": { "line": 19, - "column": 32, + "column": 28, "program": "throwInCatchClause3.ets" } } @@ -233,7 +233,7 @@ }, "end": { "line": 19, - "column": 32, + "column": 28, "program": "throwInCatchClause3.ets" } } @@ -246,7 +246,7 @@ }, "end": { "line": 19, - "column": 32, + "column": 28, "program": "throwInCatchClause3.ets" } } @@ -260,7 +260,7 @@ }, "end": { "line": 19, - "column": 35, + "column": 31, "program": "throwInCatchClause3.ets" } } @@ -273,7 +273,7 @@ }, "end": { "line": 19, - "column": 35, + "column": 31, "program": "throwInCatchClause3.ets" } } @@ -324,7 +324,7 @@ "type": "ETSTypeReferencePart", "name": { "type": "Identifier", - "name": "Exception", + "name": "Error", "loc": { "start": { "line": 21, @@ -333,7 +333,7 @@ }, "end": { "line": 21, - "column": 33, + "column": 29, "program": "throwInCatchClause3.ets" } } @@ -346,7 +346,7 @@ }, "end": { "line": 21, - "column": 33, + "column": 29, "program": "throwInCatchClause3.ets" } } @@ -359,7 +359,7 @@ }, "end": { "line": 21, - "column": 33, + "column": 29, "program": "throwInCatchClause3.ets" } } @@ -372,7 +372,7 @@ }, "end": { "line": 21, - "column": 33, + "column": 29, "program": "throwInCatchClause3.ets" } } @@ -385,7 +385,7 @@ }, "end": { "line": 21, - "column": 34, + "column": 30, "program": "throwInCatchClause3.ets" } } diff --git a/ets2panda/test/compiler/ets/throwInCatchClause3.ets b/ets2panda/test/compiler/ets/throwInCatchClause3.ets index f674939d0a1de1f69be8fd5e6611971843ee0c61..d23ebfc9ffee8f30ea05785020cb8f91b4da59d5 100644 --- a/ets2panda/test/compiler/ets/throwInCatchClause3.ets +++ b/ets2panda/test/compiler/ets/throwInCatchClause3.ets @@ -16,9 +16,9 @@ function TestFunc(): void { try { try { - throw new Exception(); + throw new Error(); } catch (e) { - throw e as Exception; + throw e as Error; } } catch (e) { //Handle the exception. diff --git a/ets2panda/test/compiler/ets/throwInFinallyBlock1-expected.txt b/ets2panda/test/compiler/ets/throwInFinallyBlock1-expected.txt index d45cb76cfee376d4d87ff5574c824388668f4f36..0c9aac234a4fdfe7e563f772c2be842218367fba 100644 --- a/ets2panda/test/compiler/ets/throwInFinallyBlock1-expected.txt +++ b/ets2panda/test/compiler/ets/throwInFinallyBlock1-expected.txt @@ -103,7 +103,7 @@ "type": "ETSTypeReferencePart", "name": { "type": "Identifier", - "name": "Exception", + "name": "Error", "loc": { "start": { "line": 18, @@ -112,7 +112,7 @@ }, "end": { "line": 18, - "column": 24, + "column": 20, "program": "throwInFinallyBlock1.ets" } } @@ -125,7 +125,7 @@ }, "end": { "line": 18, - "column": 24, + "column": 20, "program": "throwInFinallyBlock1.ets" } } @@ -138,7 +138,7 @@ }, "end": { "line": 18, - "column": 24, + "column": 20, "program": "throwInFinallyBlock1.ets" } } @@ -275,7 +275,7 @@ "type": "ETSTypeReferencePart", "name": { "type": "Identifier", - "name": "Exception", + "name": "Error", "loc": { "start": { "line": 24, @@ -284,7 +284,7 @@ }, "end": { "line": 24, - "column": 28, + "column": 24, "program": "throwInFinallyBlock1.ets" } } @@ -297,7 +297,7 @@ }, "end": { "line": 24, - "column": 28, + "column": 24, "program": "throwInFinallyBlock1.ets" } } @@ -310,7 +310,7 @@ }, "end": { "line": 24, - "column": 28, + "column": 24, "program": "throwInFinallyBlock1.ets" } } @@ -508,7 +508,7 @@ "type": "ETSTypeReferencePart", "name": { "type": "Identifier", - "name": "Exception", + "name": "Error", "loc": { "start": { "line": 30, @@ -517,7 +517,7 @@ }, "end": { "line": 30, - "column": 26, + "column": 22, "program": "throwInFinallyBlock1.ets" } } @@ -530,7 +530,7 @@ }, "end": { "line": 30, - "column": 26, + "column": 22, "program": "throwInFinallyBlock1.ets" } } @@ -543,7 +543,7 @@ }, "end": { "line": 30, - "column": 26, + "column": 22, "program": "throwInFinallyBlock1.ets" } } diff --git a/ets2panda/test/compiler/ets/throwInFinallyBlock1.ets b/ets2panda/test/compiler/ets/throwInFinallyBlock1.ets index 8325db3372af2a70620318a9ff9bd9c979be17a2..98907280d1d337c0238c9b91a54e958f5ac1c64e 100644 --- a/ets2panda/test/compiler/ets/throwInFinallyBlock1.ets +++ b/ets2panda/test/compiler/ets/throwInFinallyBlock1.ets @@ -15,19 +15,19 @@ function main(): void { try { - throw new Exception() + throw new Error() } catch (e) { try {} catch (e) {} finally { try { - throw new Exception() + throw new Error() } catch (e) {} } } finally { try { - throw new Exception() + throw new Error() } catch (e) {} } } diff --git a/ets2panda/test/compiler/ets/throwInTryStatement-expected.txt b/ets2panda/test/compiler/ets/throwInTryStatement-expected.txt index b2958d680370fdfd5cfab1828540c498e86cb911..3cfcb6de9a8d083f009b509e6f34bbe4964ed859 100644 --- a/ets2panda/test/compiler/ets/throwInTryStatement-expected.txt +++ b/ets2panda/test/compiler/ets/throwInTryStatement-expected.txt @@ -103,7 +103,7 @@ "type": "ETSTypeReferencePart", "name": { "type": "Identifier", - "name": "Exception", + "name": "Error", "loc": { "start": { "line": 18, @@ -112,7 +112,7 @@ }, "end": { "line": 18, - "column": 24, + "column": 20, "program": "throwInTryStatement.ets" } } @@ -125,7 +125,7 @@ }, "end": { "line": 18, - "column": 24, + "column": 20, "program": "throwInTryStatement.ets" } } @@ -138,7 +138,7 @@ }, "end": { "line": 18, - "column": 24, + "column": 20, "program": "throwInTryStatement.ets" } } @@ -152,7 +152,7 @@ }, "end": { "line": 18, - "column": 27, + "column": 23, "program": "throwInTryStatement.ets" } } @@ -165,7 +165,7 @@ }, "end": { "line": 18, - "column": 27, + "column": 23, "program": "throwInTryStatement.ets" } } diff --git a/ets2panda/test/compiler/ets/throwInTryStatement.ets b/ets2panda/test/compiler/ets/throwInTryStatement.ets index 584334e8c2311c4dcbfd8e96653d582929a30b2f..98a3cf9cb6d83d3b1c72d9640f7b35274e69d834 100644 --- a/ets2panda/test/compiler/ets/throwInTryStatement.ets +++ b/ets2panda/test/compiler/ets/throwInTryStatement.ets @@ -15,6 +15,6 @@ function main(): void { try { - throw new Exception(); + throw new Error(); } catch (e) {} } diff --git a/ets2panda/test/compiler/ets/tryCatchMissingParamType-expected.txt b/ets2panda/test/compiler/ets/tryCatchMissingParamType-expected.txt index ebf7255cf049f7525f9a186e7f25ed7c7b567462..ed91e164f138aa7131d78b0accd9532cf8cb236a 100644 --- a/ets2panda/test/compiler/ets/tryCatchMissingParamType-expected.txt +++ b/ets2panda/test/compiler/ets/tryCatchMissingParamType-expected.txt @@ -103,7 +103,7 @@ "type": "ETSTypeReferencePart", "name": { "type": "Identifier", - "name": "Exception", + "name": "Error", "loc": { "start": { "line": 18, @@ -112,7 +112,7 @@ }, "end": { "line": 18, - "column": 28, + "column": 24, "program": "tryCatchMissingParamType.ets" } } @@ -125,7 +125,7 @@ }, "end": { "line": 18, - "column": 28, + "column": 24, "program": "tryCatchMissingParamType.ets" } } @@ -138,7 +138,7 @@ }, "end": { "line": 18, - "column": 28, + "column": 24, "program": "tryCatchMissingParamType.ets" } } @@ -152,7 +152,7 @@ }, "end": { "line": 18, - "column": 31, + "column": 27, "program": "tryCatchMissingParamType.ets" } } @@ -165,7 +165,7 @@ }, "end": { "line": 18, - "column": 31, + "column": 27, "program": "tryCatchMissingParamType.ets" } } diff --git a/ets2panda/test/compiler/ets/tryCatchMissingParamType.ets b/ets2panda/test/compiler/ets/tryCatchMissingParamType.ets index 01c088b7132c3e9c3988ccb2a1602e362bcedd86..ebd6b0f73da19f52aeccd56d452bbbb052b37d4b 100644 --- a/ets2panda/test/compiler/ets/tryCatchMissingParamType.ets +++ b/ets2panda/test/compiler/ets/tryCatchMissingParamType.ets @@ -15,7 +15,7 @@ function main(): void { try { - throw new Exception(); + throw new Error(); } catch (e) { //Do something. } diff --git a/ets2panda/test/compiler/ets/tryDefaultCatches-expected.txt b/ets2panda/test/compiler/ets/tryDefaultCatches-expected.txt index b93c660e8315cb04146dde8a413082a652bb9fd4..6ac688c6b1a7a8aa0231d4f1cb1cae5e7f4fcc6d 100644 --- a/ets2panda/test/compiler/ets/tryDefaultCatches-expected.txt +++ b/ets2panda/test/compiler/ets/tryDefaultCatches-expected.txt @@ -193,7 +193,7 @@ "loc": { "start": { "line": 19, - "column": 26, + "column": 22, "program": "tryDefaultCatches.ets" }, "end": { @@ -212,7 +212,7 @@ "type": "ETSTypeReferencePart", "name": { "type": "Identifier", - "name": "Exception", + "name": "Error", "loc": { "start": { "line": 19, @@ -221,7 +221,7 @@ }, "end": { "line": 19, - "column": 24, + "column": 20, "program": "tryDefaultCatches.ets" } } @@ -234,7 +234,7 @@ }, "end": { "line": 19, - "column": 24, + "column": 20, "program": "tryDefaultCatches.ets" } } @@ -247,7 +247,7 @@ }, "end": { "line": 19, - "column": 24, + "column": 20, "program": "tryDefaultCatches.ets" } } diff --git a/ets2panda/test/compiler/ets/tryDefaultCatches.ets b/ets2panda/test/compiler/ets/tryDefaultCatches.ets index 90b180275b9d8cbbd52ee4279e9328653a6853af..accfa16406598f876189f920ee1652630ca269db 100644 --- a/ets2panda/test/compiler/ets/tryDefaultCatches.ets +++ b/ets2panda/test/compiler/ets/tryDefaultCatches.ets @@ -16,7 +16,7 @@ function main(): void { try { throw new NullPointerError(); - } catch (e: Exception) { + } catch (e: Error) { //Do something. } catch (e) { //Do something. diff --git a/ets2panda/test/runtime/ets/Enum3.ets b/ets2panda/test/runtime/ets/Enum3.ets index 150f7e76c6e6928ef87ffbb4a3b84972834b9a4b..f149099713adc51dc304a0af3bc38b3218978afa 100644 --- a/ets2panda/test/runtime/ets/Enum3.ets +++ b/ets2panda/test/runtime/ets/Enum3.ets @@ -43,9 +43,9 @@ function main(): void { try { let yellow: Color = Color.getValueOf("Yellow"); arktest.assertTrue(false) - } catch (e: Exception) { - arktest.assertTrue((e as Object).toString().startsWith("No enum constant Color.Yellow")) - } catch (e) {} + } catch (e) { + arktest.assertTrue((e as Object).toString().startsWith("Error: No enum constant Color.Yellow")) + } let one: int = 1; let green = one as Color; @@ -54,7 +54,7 @@ function main(): void { try { let x = 5 as Color; arktest.assertTrue( false) - } catch (e: Error) { + } catch (e) { arktest.assertTrue( (e as Object).toString().startsWith("Error: No enum Color with value 5")) } diff --git a/ets2panda/test/runtime/ets/Enum5.ets b/ets2panda/test/runtime/ets/Enum5.ets index c765271af61c591276d4cd6e795e06b582498f6c..44e5b8ea664b72240fecc755aebc05c9168f9fbe 100644 --- a/ets2panda/test/runtime/ets/Enum5.ets +++ b/ets2panda/test/runtime/ets/Enum5.ets @@ -77,9 +77,9 @@ function main(): void { try { let yellow: Color = Color.getValueOf("Yellow"); arktest.assertTrue(false) - } catch (e: Exception) { - arktest.assertTrue((e as Object).toString().startsWith("No enum constant Color.Yellow")) - } catch (e) {} + } catch (e) { + arktest.assertTrue((e as Object).toString().startsWith("Error: No enum constant Color.Yellow")) + } ord = "red"; let green: Color = ord as Color; @@ -88,7 +88,7 @@ function main(): void { try { let x = "a" as Color; arktest.assertTrue( false) - } catch (e: Error) { + } catch (e) { arktest.assertTrue( (e as Object).toString().startsWith("Error: No enum Color with value a")) } diff --git a/ets2panda/test/runtime/ets/finallyCatchExecutedNormally.ets b/ets2panda/test/runtime/ets/finallyCatchExecutedNormally.ets index a9b85803f1a915d757f30558d3f581834b5cba8f..5d37cc812337a9117bff387b4d6f2fcc2280973a 100644 --- a/ets2panda/test/runtime/ets/finallyCatchExecutedNormally.ets +++ b/ets2panda/test/runtime/ets/finallyCatchExecutedNormally.ets @@ -16,7 +16,7 @@ function main() : void { let a = 0; try { - throw new Exception(); + throw new Error(); } catch (e) { a = 2; } finally { diff --git a/ets2panda/test/runtime/ets/finallyClauseThrow.ets b/ets2panda/test/runtime/ets/finallyClauseThrow.ets index 2b9537b10a5f0082fa06ea58bc64e0afea04126f..55baa5cdc210a227354da74745216a83cff34b8e 100644 --- a/ets2panda/test/runtime/ets/finallyClauseThrow.ets +++ b/ets2panda/test/runtime/ets/finallyClauseThrow.ets @@ -16,7 +16,7 @@ function main() : int { try { try { - throw new Exception(); + throw new Error(); } catch (e:Error) { arktest.assertTrue(false) } finally { diff --git a/ets2panda/test/runtime/ets/generic_exception.ets b/ets2panda/test/runtime/ets/generic_exception.ets index e5ef48a63f646553b16525d043806002585b72e1..7db4c0e4fb50035f4a54e2737dc3477b44a8497b 100644 --- a/ets2panda/test/runtime/ets/generic_exception.ets +++ b/ets2panda/test/runtime/ets/generic_exception.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -class E extends Exception {} +class E extends Error {} function main(): int { try { diff --git a/ets2panda/test/runtime/ets/top_level_02.ets b/ets2panda/test/runtime/ets/top_level_02.ets index bbdf6f16085fac745a3fe7c28b521f4cd420ce79..a76b771d15a5cbb06e6e0fd153276c30c9923eb5 100644 --- a/ets2panda/test/runtime/ets/top_level_02.ets +++ b/ets2panda/test/runtime/ets/top_level_02.ets @@ -27,7 +27,7 @@ switch (q) { } } -class TestException extends Exception { +class TestError extends Error { } arktest.assertEQ(q, 3) @@ -36,9 +36,9 @@ arktest.assertEQ(s, "abc") try { s += "cba"; q += 5; - throw new TestException(); + throw new TestError(); } -catch (e: TestException) { +catch (e: TestError) { } catch (e) { arktest.assertTrue(false) diff --git a/ets2panda/test/runtime/ets/try-catch-no-param.ets b/ets2panda/test/runtime/ets/try-catch-no-param.ets index 96d6bbc534370ec361f6c181ff8e9a04643d628c..dbcb9dbfabd2d32437927af478f77e720297875c 100644 --- a/ets2panda/test/runtime/ets/try-catch-no-param.ets +++ b/ets2panda/test/runtime/ets/try-catch-no-param.ets @@ -13,13 +13,13 @@ * limitations under the License. */ -class TestException extends Exception {} +class TestError extends Error {} let catchCode = 0; function main(): void { try { - throw new TestException(); + throw new TestError(); } catch (e) { catchCode = 1; } @@ -27,7 +27,7 @@ function main(): void { arktest.assertEQ(catchCode, 1) try { - throw new Exception(); + throw new Error(); } catch (e) { catchCode = 2; } diff --git a/ets2panda/test/runtime/ets/try-catch.ets b/ets2panda/test/runtime/ets/try-catch.ets index 9415ba2e5840a644054f27acd1689d61c62b4700..cfe155b47fe231e7af0005c8018b075a00724a47 100644 --- a/ets2panda/test/runtime/ets/try-catch.ets +++ b/ets2panda/test/runtime/ets/try-catch.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -class TestException extends Exception {} +class TestError extends Error {} let catchCode = 0; @@ -43,10 +43,10 @@ function main(): void { arktest.assertEQ(catchCode, 2) try { - throw new TestException(); - } catch(e: TestException) { + throw new TestError(); + } catch(e: TestError) { catchCode = 3; - } catch (e: Exception) { + } catch (e: Error) { arktest.assertTrue(false) } catch (e) { arktest.assertTrue(false) @@ -55,10 +55,10 @@ function main(): void { arktest.assertEQ(catchCode, 3) try { - throw new TestException(); - } catch (e: Exception) { + throw new TestError(); + } catch (e: Error) { catchCode = 4; - } catch (e: TestException) { + } catch (e: TestError) { arktest.assertTrue(false) } catch (e) { arktest.assertTrue(false)