Permalink
Browse files

:report for dbi-database-error.

  • Loading branch information...
1 parent eee6023 commit 54c319a42cb84deed56e4eeab4107a41e07bf7ca @fukamachi committed May 28, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/error.lisp
View
8 src/error.lisp
@@ -38,7 +38,13 @@ database itself."))
(define-condition <dbi-database-error> (<dbi-error>)
((message :initarg :message)
(error-code :initarg :error-code))
- (:documentation "Exception for errors related to the database."))
+ (:documentation "Exception for errors related to the database.")
+ (:report
+ (lambda (condition stream)
+ (format stream
+ "DB Error: ~A (Code: ~A)"
+ (slot-value condition 'message)
+ (slot-value condition 'error-code)))))
@export
(define-condition <dbi-data-error> (<dbi-database-error>) ()

0 comments on commit 54c319a

Please sign in to comment.