catch

final_realms_fluffos_v1/lib/doc/driver/efuns/system/catch · 644 B

From the archive final_realms_fluffos_v1.zip

Download the archive   « Back to the archive contents

.\"catch an evaluation error
.DT
catch
Discworld driver help
catch

Name
.SI 5
catch() - catch an evaluation error

.EI
Synopsis
.SI 5
mixed catch( mixed expr );

.EI
Description
.SP 5 5
Evaluate <expr>. If there is no error, 0 is returned. If there is a
standard error, a string (with a leading '*') will be returned.

The function throw() can also be used to immediately return any value,
except 0. catch() is not really a function call, but a directive to the
compiler.

The catch() is somewhat costly, and should not be used just anywhere.
Rather, use it at places where an error would destroy consistency.

.EP
See also
.SI 5
throw(3)
.EI

Site Stats

Snippets: 1791
Codebases: 571