fail [Macro]


Purpose

The fail macro causes the method in which it is invoked to fail immediately.

Syntax

fail &optional result

Arguments

The result argument is returned as the value of the failed method. If no result is supplied, the method returns nil.

Examples

(defmethod move (?x) 
    :title "move box" 
    :situation (Box ?x) 
    :response ((if *condition* 
                 (fail) 
                 (move-box ?x)))) 
(setq *condition* t) 
(perform (move (fi Box3)) :return :success-p) ==> NIL

See Also

Last modified: Jun 1 1995