OUR SITES NetworkRADIUS FreeRADIUS

The try Statement

Syntax
try {
    [ statements ]
}
catch {
    ...
}

The try statement runs a series of substatements in a block. If the block returns an error such as fail, reject, invalid, or disallow, a subsequent catch block is executed.

[ statements ]

The unlang commands which will be executed. A try block cannot be empty.

Every try block must be followed by a catch block.

Example
try {
	sql
}
catch {
	# ... run only if sql failed

	ok	# over-ride the "fail" code
}

There is some overlap in functionality between try / catch and redundant. The main difference (TODO) is that a catch statement can catch specific actions.