Scribit Edi Weitz dies 08/05/2007 hora 00:05:
If this is really still a problem, I'd like to release a patch for all supported implementations.
I'm not sure why there would be a need to use an implementation specific condition, as CL provides stream-error (which is a superclass of the SBCL specific condition used in the patch).
diff -r 1ad0d5aa26ef packages.lisp --- a/packages.lisp Tue May 01 19:14:06 2007 +0200 +++ b/packages.lisp Tue May 08 01:30:13 2007 +0200 @@ -131,6 +131,7 @@ :+http-unsupported-media-type+ :+http-use-proxy+ :+http-version-not-supported+ + :always-catch-stream-errors :authorization :aux-request-value :content-length diff -r 1ad0d5aa26ef util.lisp --- a/util.lisp Tue May 01 19:14:06 2007 +0200 +++ b/util.lisp Tue May 08 01:28:49 2007 +0200 @@ -100,10 +100,16 @@ are discarded (that is, the body is an `(let (,,@temps) ,,@body))))))
-(defun maybe-invoke-debugger (condition) - "Invokes the debugger with CONDITION if *CATCH-ERRORS-P* is NIL." +(defgeneric maybe-invoke-debugger (condition) + (:documentation "Invokes the debugger with CONDITION if *CATCH-ERRORS-P* is NIL.")) + +(defmethod maybe-invoke-debugger (condition) (unless *catch-errors-p* (invoke-debugger condition))) + +(defun always-catch-stream-errors () + (defmethod maybe-invoke-debugger :around ((condition stream-error)) + nil))
(defmacro with-debugger (&body body) "Executes BODY and invokes the debugger if an error is signaled and
But maybe that's still a quick and dirty fix for the problem. Maybe a way to add and remove classes of conditions to catch would be better...
Doubtfully, Pierre