next up previous contents
Next: Types Checking Up: Programming Tools and Functions Previous: Trace

Trapping Errors

Calling Sequence:
traperror(exp)
Parameters:
exp : an expression

Returns: The result of evaluating exp or a string if an error occurs.

Synopsis: If an error occurs while evaluating exp, the traperror function returns a string consisting of the Darwin error message. Execution does not halt. If no error occurs, traperror simply returns the result of evaluating exp.

Examples:

> msg := traperror(undefined_symbol / 20);




Gaston Gonnet
1998-09-15