Skip to content

Commit 71051fd

Browse files
committed
Fix Try-Catch error
1 parent 5afdd8a commit 71051fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testing/VM.cls

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,11 @@ Private Function ExecTryCatchNode(node As Map, progScope As ScopeStack) As Strin
350350
Dim i As Long
351351
For i = 1 To tryStmts.Count
352352
Dim ctrl As String: ctrl = ExecuteStmtNode(tryStmts(i), progScope)
353-
If ctrl = "RETURN" Or ctrl = "ERR" Then ExecTryCatchNode = ctrl: Exit Function
353+
If ctrl = "RETURN" Or ctrl = "ERR" Then
354+
ExecTryCatchNode = ctrl
355+
If ctrl = "ERR" Then GoTo TryErr
356+
Exit Function
357+
End If
354358
Next i
355359
ExecTryCatchNode = ""
356360
Exit Function

0 commit comments

Comments
 (0)