[hunchentoot-devel] *catch-errors-p* and spurious stream errors patch (add your own implementation and shake).
Pierre THIERRY
nowhere.man at levallois.eu.org
Mon May 7 23:39:13 UTC 2007
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 (,, at temps)
,, at 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
--
nowhere.man at levallois.eu.org
OpenPGP 0xD9D50D8A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://mailman.common-lisp.net/pipermail/tbnl-devel/attachments/20070508/c1467d4b/attachment.sig>
More information about the Tbnl-devel
mailing list