Table of Contents
When an error occurred, you are in a break loop. You can evaluate forms as usual. The help command (or help key if there is one) lists the available debugging commands.
Macro EXT:MUFFLE-CERRORS
. The macro (
executes the EXT:MUFFLE-CERRORS
{form
}*)form
s; when a continuable ERROR
occurs whose CONTINUE
RESTART
can be invoked non-interactively (this includes all continuable ERROR
s signaled
by the function CERROR
), no message is printed, instead, the CONTINUE
RESTART
is invoked.
Macro EXT:APPEASE-CERRORS
. The macro (
executes the EXT:APPEASE-CERRORS
{form
}*)form
s; when a continuable ERROR
occurs whose CONTINUE
RESTART
can be invoked non-interactively (this includes all continuable ERROR
s SIGNAL
ed
by the function CERROR
), it is reported as a WARNING
, and the
CONTINUE
RESTART
is invoked.
Macro EXT:ABORT-ON-ERROR
. The macro (
executes the EXT:ABORT-ON-ERROR
{form
}*)form
s; when an ERROR
occurs,
or when a Control-C interrupt occurs,
the error message is printed and the ABORT
RESTART
is invoked.
Macro EXT:EXIT-ON-ERROR
. The macro (
executes the EXT:EXIT-ON-ERROR
{form
}*)form
s; when an ERROR
occurs,
or when a Control-C interrupt occurs,
the error message is printed and CLISP terminates with an error status.
Variable CUSTOM:*REPORT-ERROR-PRINT-BACKTRACE*
. When this variable is non-NIL
the error message printed by
EXT:ABORT-ON-ERROR
and EXT:EXIT-ON-ERROR
includes the backtrace (stack).
Function EXT:SET-GLOBAL-HANDLER
. The function (
establishes a global handler for the EXT:SET-GLOBAL-HANDLER
condition
handler)condition
.
The handler
should be FUNCALL
able (a
SYMBOL
or a FUNCTION
). If it returns, the next applicable
handler is invoked, so if you do not want to land in the debugger, it
should not return.
E.g., the option -on-error
abort
and the macro
EXT:ABORT-ON-ERROR
are implemented by installing the following handler:
(defun sys::abortonerror (condition) (sys::report-error condition) (INVOKE-RESTART
(FIND-RESTART
'ABORT
condition)))
When handler
is NIL
, the handler
for condition
is removed and returned.
When condition
is also NIL
, all global handlers are removed and returned
as a LIST
, which can then be passed to EXT:SET-GLOBAL-HANDLER
as the
first argument and the handlers re-established.
Macro EXT:WITHOUT-GLOBAL-HANDLERS
. The macro (
removes all global handlers, executes EXT:WITHOUT-GLOBAL-HANDLERS
&BODY
body
)body
, and
then restores the handlers.
Macro EXT:WITH-RESTARTS
. The macro EXT:WITH-RESTARTS
is like RESTART-CASE
, except that the
forms are specified after the restart clauses instead of before them,
and the restarts created are not implicitly associated with any CONDITION
.
(
is
therefore equivalent to EXT:WITH-RESTARTS
({restart-clause
}*) {form
}*)(
.RESTART-CASE
(PROGN
{form
}*)
{restart-clause
}*)
These notes document CLISP version 2.41 | Last modified: 2006-10-13 |