[usocket-cvs] r446 - usocket/branches/0.4.x

Chun Tian (binghe) ctian at common-lisp.net
Tue Oct 21 14:02:59 UTC 2008


Author: ctian
Date: Tue Oct 21 14:02:59 2008
New Revision: 446

Log:
bugfix: non-simple UNKNOWN-ERRORs should be report as usual.

Modified:
   usocket/branches/0.4.x/condition.lisp

Modified: usocket/branches/0.4.x/condition.lisp
==============================================================================
--- usocket/branches/0.4.x/condition.lisp	(original)
+++ usocket/branches/0.4.x/condition.lisp	Tue Oct 21 14:02:59 2008
@@ -110,13 +110,16 @@
   ((real-error :initarg :real-error
                :accessor usocket-real-error))
   (:report (lambda (c stream)
-             (format stream
-                     (simple-condition-format-control (usocket-real-error c))
-                     (simple-condition-format-arguments (usocket-real-error c)))))
+             (typecase c
+               (simple-condition
+                (format stream
+                        (simple-condition-format-control (usocket-real-error c))
+                        (simple-condition-format-arguments (usocket-real-error c))))
+               (otherwise
+                (format stream "The condition ~A occurred." (usocket-real-error c))))))
   (:documentation "Error raised when there's no other - more applicable -
 error available."))
 
-
 (define-usocket-condition-classes
   (ns-try-again)
   (ns-condition))
@@ -140,9 +143,13 @@
   ((real-error :initarg :real-error
                :accessor ns-real-error))
   (:report (lambda (c stream)
-             (format stream
-                     (simple-condition-format-control (ns-real-error c))
-                     (simple-condition-format-arguments (ns-real-error c)))))
+             (typecase c
+               (simple-condition
+                (format stream
+                        (simple-condition-format-control (usocket-real-error c))
+                        (simple-condition-format-arguments (usocket-real-error c))))
+               (otherwise
+                (format stream "The condition ~A occurred." (usocket-real-error c))))))
   (:documentation "Error raised when there's no other - more applicable -
 error available."))
 




More information about the usocket-cvs mailing list