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

Handler-Bind question...



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