try/catch

This commit is contained in:
2020-11-18 16:11:58 -07:00
parent bb97388247
commit fea2798513
3 changed files with 50 additions and 3 deletions

View File

@@ -131,4 +131,10 @@ class BasicTestCase extends Test {
function testTypedDefvar() {
Assert.equals(8, BasicTestCase.myInt);
}
function testTryCatch() {
Assert.equals(5, BasicTestCase.myTryCatch("string error"));
Assert.equals(6, BasicTestCase.myTryCatch(404));
Assert.equals(7, BasicTestCase.myTryCatch(["list error"]));
}
}