Skip to main content


Command Description

Use try-catch to handle code blocks that might throw an error

Command Prototype

Try count 

Catch Ex

End Try

Parameter Description

countTruenumber3The value has to be an integer greater than or equal to 1. If an exception occurs, it will automatically return to the try block to retry. If there are still exceptions after the retry, the statement in the catch block will be executed


TracePrint("------------------------------------Exception Retry------- -----------------------------------") 
//[Remarks] Use try catch to handle code blocks that may cause exceptions.
TracePrint "Retry to execute the content in try three times, if an exception occurs, execute the content in Catch"
Try 3
TracePrint "a"
TracePrint []&"a"
Catch e
TracePrint error
TracePrint "123"
End Try