It's exception handling.
Commonly they look something like:
Code:
try
{
// something
}
catch (Exception e)
{
// something
}
So if the code executed in the try block results in an exception, it'll run the catch block.
I tried this morning in MOHAA and it recognises the syntax and the code is executed inside the try block, but I can't get it to catch anything. E.g.:
Code:
try
{
while (1)
println "infinity"
}
catch
{
println "caught"
}
Oh, and this is where I saw it referenced:
Code:
statement:
----------
identifier event_parameter_list :
case integer event_parameter_list :
case identifier event_parameter_list :
compound_statement
if prim_expr statement
if prim_expr statement else statement
while prim_expr statement
for ( statement ; expr ; statement_list ) statement
try compound_statement catch compound_statement
switch prim_expr compound_statement
break
continue
identifier event_parameter_list
nonident_prim_expr identifier event_parameter_list
nonident_prim_expr = expr
nonident_prim_expr += expr
nonident_prim_expr -= expr
nonident_prim_expr ++
nonident_prim_expr --