ErrorCode Procedure
Gets the last error code that was thrown.
Use this function in a
catch block to determine the type of error that was thrown.
See
Built-In Constants for a list of error codes used by TMBASIC functions.
Declaration
function ErrorCode() as Number
Return value
Number — The last error code that was thrown.
Example
Code
try
throw 5, "hello"
catch
print ErrorCode()
print ErrorMessage()
end try
Output