[previous] [up] [next]     [contents] [index]
Next: Primitive Actions Up: Test engine Previous: Actions and completeness

Errors

Errors in the primitive actions (which necessarily run in the handler thread) are caught and reraised in the calling thread.

However, the primitive actions can only guarantee that the action has started, and they may return before the action has completed. As a consequence, an action may raise an error long after the function that started it has returned. In this case, the error is saved and reraised at the first opportunity (the next primitive action).

The test engine keeps a buffer for one error, saving only the first error. Any subsequent errors are discarded. Reraising an error empties the buffer, allowing the next error to be saved.

For reraising a pending error, we have available:

(mred:test:reraise-error)

Reraises any pending error (and flushes the buffer), or else returns void.



PLT