[movitz-cvs] CVS update: movitz/losp/muerte/conditions.lisp
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Thu Apr 15 15:11:44 UTC 2004
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv4440
Modified Files:
conditions.lisp
Log Message:
Added conditions arithmetic-error and division-by-zero.
Date: Thu Apr 15 11:11:44 2004
Author: ffjeld
Index: movitz/losp/muerte/conditions.lisp
diff -u movitz/losp/muerte/conditions.lisp:1.4 movitz/losp/muerte/conditions.lisp:1.5
--- movitz/losp/muerte/conditions.lisp:1.4 Tue Apr 6 10:05:18 2004
+++ movitz/losp/muerte/conditions.lisp Thu Apr 15 11:11:44 2004
@@ -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.4 2004/04/06 14:05:18 ffjeld Exp $
+;;;; $Id: conditions.lisp,v 1.5 2004/04/15 15:11:44 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -128,7 +128,23 @@
(:report (lambda (c s)
(format s "End of file encountered on ~W."
(stream-error-stream c)))))
-
+
+(define-condition arithmetic-error (error)
+ ((operation
+ :initarg :operation
+ :initform nil
+ :reader arithmetic-error-operation)
+ (operands
+ :initarg :operands
+ :initform nil
+ :reader arithmetic-error-operands)))
+
+(define-condition division-by-zero (arithmetic-error)
+ ()
+ (:report (lambda (c s)
+ (declare (ignore c))
+ (format s "Division by zero."))))
+
(defun make-condition (type &rest slot-initializations)
(declare (dynamic-extent slot-initializations))
(apply 'make-instance type slot-initializations))
More information about the Movitz-cvs
mailing list