NextPrevUpTopContentsIndex

with-action-item-error-handling

Macro
Summary

Executes a body of code across action lists and items, signalling errors and then continuing to the next action item.

Package

lispworks

Signature

with-action-item-error-handling action-list-var action-item-var ignore-errors-p &body body

Arguments

action-list-var

A variable.

action-item-var

A variable.

ignore-errors-p

A boolean.

body

A body of Lisp code.

Description

The with-action-item-error-handling macro executes the body with action-list-var and action-item-var are bound to the action list and item respectively. If ignore-errors-p is set to t then errors are handled. The behavior of the handler is to signal a warning in which the action-list, item and original error are all reported; execution then continues with the next action-item.

Example
(defun my-execution-function (the-action-list 
                              other-args
                              &key ignore-errors-p
                              &allow-other-keys)
    (with-action-list-mapping (the-action-list
                               an-action-item
                               action-item-data)
      (with-action-item-error-handling (the-action-list
                                        an-action-item
                                        ignore-errors-p)
        (do-something-interesting-first)
        (apply (car action-item-data) other-args (cdr action-item-data)))))

If this function was invoked with the keyword argument :ignore-errors-p t , and an error was signalled while executing the body-form(s) for one of the action-items, then a warning such as:

Warning: Got an error 'The variable *PREV-STATE* is 
unbound.' while executing action "Initialize State" in list "Startup Inits".

would be signalled and execution would continue with the next action-item.

See also

*handle-missing-action-in-action-list*


LispWorks Reference Manual - 12 Mar 2008

NextPrevUpTopContentsIndex