[movitz-cvs] CVS movitz/losp/muerte
ffjeld
ffjeld at common-lisp.net
Sat May 6 20:29:09 UTC 2006
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory clnet:/tmp/cvs-serv13391
Modified Files:
conditions.lisp
Log Message:
Tweak etypecase-error.
--- /project/movitz/cvsroot/movitz/losp/muerte/conditions.lisp 2006/04/28 23:21:59 1.19
+++ /project/movitz/cvsroot/movitz/losp/muerte/conditions.lisp 2006/05/06 20:29:08 1.20
@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Created at: Wed Nov 20 15:47:04 2002
;;;;
-;;;; $Id: conditions.lisp,v 1.19 2006/04/28 23:21:59 ffjeld Exp $
+;;;; $Id: conditions.lisp,v 1.20 2006/05/06 20:29:08 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -115,6 +115,18 @@
(type-error-datum c)
(type-error-expected-type c)))))
+(define-condition etypecase-error (type-error)
+ ()
+ (:report (lambda (c s)
+ (format s "The object '~S' fell through an etypecase where the legal types were ~S."
+ (type-error-datum c)
+ (type-error-expected-type c)))))
+
+(defun etypecase-error (datum expecteds)
+ (error 'etypecase-error
+ :datum datum
+ :expected-type (cons 'or expecteds)))
+
(define-condition control-error (error) ())
(define-condition throw-error (control-error)
More information about the Movitz-cvs
mailing list