[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Handler-Bind question...
- To: info-mcl@cambridge.apple.com
- Subject: Handler-Bind question...
- From: schmill@earhart.NOT.SET (Matt Schmill)
- Date: 29 Sep 1994 17:19:42 GMT
- Organization: OrgFreeware
- Reply-to: schmill@earhart.NOT.SET (Matt Schmill)
- Sender: owner-info-mcl@cambridge.apple.com
Hello all... I'm building an error handling macro that I want to use for a GUI
on top of a portable application. The macro will basically be :
(defmacro with-error-handling (&body body)
(handler-bind ((error (condition) ...)
(warning (condition) ...))
,@body))
the problem is that I can't differentiate clearly between the two cases;
If there is an error, I want to jump out of the body. a throw/catch form will
allow this. But if there's a warn, I want to finish evaluation of BODY
_without the warning being displayed_ in the listener. I want my GUI to
handle
these cases without the listener displaying anything.
handler-case has the opposite problem. I can't seem to find a way to resume the
body if the WARNING is trapped.
Does anyone out there have a clever solution ? If so, I'd love to hear it..
(redefining the warn function is out of the question)
thanks in advance