errorTrap

 

 

Overview

The errorTrap function evaluates the first expression. If an Error value results, the second expression is evaluated. The Error value is trapped by the function instead of returning to the top level console as would occur if an error function was used.

Usage

The errorTrap function is used if you didn't want to exit to the top level console if an error occurred. One could therefore trap the error and performed some other action once the error is trapped.

 

Syntax


Expression:

(errorTrap exp1 exp2)


Arguments Name Type Description
Argument:exp1--- The expression to be evaluated.
Argument:exp2--- The expression to be evaluated if an error occurred.

Returns:

The result of expr1 (if no error).



 

Examples

Here are a number of links to Lambda coding examples which contain this instruction in various use cases.

 

Argument Types

Here are the links to the data types of the function arguments.

Error

Here are also a number of links to functions having arguments with any of these data types.

errorTrap error isIdentical string
sysError

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE