[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More interesting *uninteresting-functions*

    Date: 11 Apr 88 09:21 EST
    From: STERRITT%SDEVAX.decnet@ge-crd.arpa

    While I'm asking this, I have a need for a similar thing that catches all
    errors, notifies some other processes that this one has died, and then
    (ideally) goes right into the debugger at the error.  I've tried writing
    something like the above, and just calling (zl:dbg) to drop into the debugger,
    but of course I'm a long way away from the actual crash site.  Is there
    a way to have something run at crash time, but then leave things where they

When I want to do something like that, I use CONDITION-BIND to make a
handler for ERROR that sends the notification and then returns NIL.
When a CONDITION-BIND handler returns NIL the system continues looking
for another handler, so this is a nice way to slip in a handler action
without affecting the default handling.  Example:

(condition-bind ((error #'(lambda (e)
			    (tv:notify nil "I got this error: ~S"))))