Oops, I didn't write a docstring for the new function:
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:36:51 2007 +0200 @@ -100,10 +100,17 @@ 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 () + "Adds an around method on MAYBE-INVOKE-DEBUGGER to always catch stream-related 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
Correctively, Pierre