TRY … CATCH … END TRY,
There are events during the execution of your program that may cause errors to occur.
An error condition normally causes the program to immediately halt execution and display an error message.
In many cases it would be better to build in support for these errors so that corrective action may be taken.
In many cases this simply involves telling the user that the value was incorrect and to re-enter the value.
The CATCH command is used to catch errors. If an error is thrown in the
try block then the program will resume in the catch block. The error message generated by the error will be assigned
to the variable that follows the catch statement.
DIM ERR AS STRING
REM *** Do Something ***
THROW "My Error"
PRINT "Error> " + ERR