[rucksack-cvs] CVS rucksack
alemmens
alemmens at common-lisp.net
Fri Aug 4 11:06:04 UTC 2006
Update of /project/rucksack/cvsroot/rucksack
In directory clnet:/tmp/cvs-serv29619
Modified Files:
p-btrees.lisp
Log Message:
Improve error reporting for btree errors (from Edi Weitz).
--- /project/rucksack/cvsroot/rucksack/p-btrees.lisp 2006/08/04 10:59:10 1.5
+++ /project/rucksack/cvsroot/rucksack/p-btrees.lisp 2006/08/04 11:06:04 1.6
@@ -1,4 +1,4 @@
-;; $Id: p-btrees.lisp,v 1.5 2006/08/04 10:59:10 alemmens Exp $
+;; $Id: p-btrees.lisp,v 1.6 2006/08/04 11:06:04 alemmens Exp $
(in-package :rucksack)
@@ -57,14 +57,21 @@
((btree :initarg :btree :reader btree-error-btree)))
(define-condition btree-search-error (btree-error)
- ((key :initarg :key :reader btree-error-key)))
+ ((key :initarg :key :reader btree-error-key))
+ (:report (lambda (condition stream)
+ (format stream "An entry for the key ~S could not be found."
+ (btree-error-key condition)))))
+
(define-condition btree-insertion-error (btree-error)
((key :initarg :key :reader btree-error-key)
(value :initarg :value :reader btree-error-value)))
(define-condition btree-key-already-present-error (btree-insertion-error)
- ())
+ ()
+ (:report (lambda (condition stream)
+ (format stream "There's already another value for the key ~S."
+ (btree-error-key condition)))))
(define-condition btree-type-error (btree-error type-error)
())
More information about the rucksack-cvs
mailing list