[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Roger Kehr <email@example.com> writes:
> Normally, the system just tells me
> *** - Ctrl-C: User break
> but continues running. This is a very unsatisfying behavior in an
> UNIX environment.
Yes, I agree.
> After some investigation of the code I found that the function bound
> to the variable *BREAK-DRIVER* is used to handle these kind of breaks.
> My idea was now to bind a function like the following to
> 1. Is this a good way of handling this situation?
Yes. Except that the code to print the condition should better read like
(when (and condition print-it)
(write-string "*** - " *error-output*)
(print-condition condition *error-output*)
because if print-it is NIL, the condition has already been printed by
the caller, and you shouldn't use the SIMPLE-ERROR accessors unless
you have verified that the condition is of type SIMPLE-ERROR (it could
also be a WARNING if *break-on-warnings* is true).
> It seems to work quiet fine.
> 2. Is there a better way of handling this?
Not for now.
In order to handle normal conditions (not Ctrl-C) you could use the
EXIT-ON-ERROR and APPEASE-CERRORS macros documented in impnotes.txt.
! To unsubscribe from the clisp-list mailing list, send mail to !
! firstname.lastname@example.org !
! including the two words "unsubscribe clisp-list" as message body. !