Skip to main content

FAILURE

attribute := expression : FAILURE(handler) ;

attributeThe name of the Attribute.
expressionThe definition of the attribute.
handlerThe action to run if the expression fails.

The FAILURE service executes the handler Attribute when the expression fails. FAILURE notionally executes in parallel with the failed return of the result. This service implicitly causes the attribute to be evaluated at global scope instead of the enclosing scope. Only available if workflow services are turned on (see #OPTION(workflow)).

Example:

  sPeople  := SORT(Person,Person.per_first_name);
  nUniques := COUNT(DEDUP(sPeople,Person.per_first_name AND
                    Person.address))
           : FAILURE(Email.simpleSend(SystemsPersonel,
                    SystemsPersonel.email,'ouch.htm'));

See Also: SUCCESS, RECOVERY