Summary
When "If ... Then ..." is used within "Try ... Catch ..." the IDE gives an 2 errors:
- 'Catch' without matching 'Try'
- 'End' without matching block opener (If, Sub, Function, Class, etc.).
Objo Studio Version
26.6.2
Operating System
Select the operating system(s) affected as tags for this post.
Steps To Reproduce
e.g.
Try
If mDbConnected And Ps <> Nothing Then
Var ps1 As PreparedStatement = mParsePs(Ps)
If ps1 <> Nothing Then rs = ps1.SelectSQL()
End If
If AutoRemovePs Then mExecPsAll[0].ClearCache() # Clear the list of prepared statements after execution
Catch de As DatabaseException
RaiseEvent DbException("GetRsQry" + "/ " + DbName, "DbError " + de.ErrorCode.ToString() + " - " + de.Message)
End Try
Expected Result
Single line "If ... Then ..." should be accepted without any error.
Actual Result
Single line "If ... Then ..." gives errors in IDE
Workaround
Changing the single line in multi line "If ... Then" and "End If" makes the errors to disappear.
If ps1 <> Nothing Then
rs = ps1.SelectSQL()
End If
If AutoRemovePs Then
mExecPsAll[0].ClearCache() # Clear the list of prepared statements after execution
End If
Screenshots, Logs, Or Sample Project