try

From Bohemia Interactive Community
Revision as of 12:22, 23 July 2006 by Planck (talk | contribs)
Jump to navigation Jump to search


try code


Operand types:

code: Code

Type of returned value:

Nothing

Compatibility:

Version 2.60 required.

Description:

Defines a try-catch structure.

This sets up an exception handling block.

Any thrown exception in a try block is caught in a catch block.


Example:

try {
  if (_name == "") then { 
    throw "No Name"
  }
}
 
catch {
  if (_exception == "No Name") then {
    ....
  }
}