Try

Purpose:

Lets you test a block of code for errors

Category:

Error Handling

Syntax:

Try
...
EndTry

Example:

Try

   Throw "This is an error"

Catch

   AlertBox "There was an error" "Error: [lastError]" ""

Finally

   AlertBox "Finally" "This will execute allways" ""

EndTry


Catch

Purpose:

Lets you handle the error. Use it inside a Try / EndTry block

Category:

Error Handling

Syntax:

Catch

Example:

Try

   Throw "This is an error"

Catch

   AlertBox "There was an error" "Error: [lastError]" ""

Finally

   AlertBox "Finally" "This will execute allways" ""

EndTry


Throw

Purpose:

Lets you create custom errors. Use it inside a Try / EndTry block

Category:

Error Handling

Syntax:

Throw "Error message"

Example:

Try

   Throw "This is an error"

Catch

   AlertBox "There was an error" "Error: [lastError]" ""

Finally

   AlertBox "Finally" "This will execute allways" ""

EndTry


Finally

Purpose:

Lets you execute code, after try and catch, regardless of the result.
Use it inside a Try / EndTry block

Category:

Error Handling

Syntax:

Finally

Example:

Try

   Throw "This is an error"

Catch

   AlertBox "There was an error" "Error: [lastError]" ""

Finally

   AlertBox "Finally" "This will execute allways" ""

EndTry