projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9422: 20 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
[clsql.git]
/
sql
/
conditions.lisp
diff --git
a/sql/conditions.lisp
b/sql/conditions.lisp
index 413eae61630bbcddfaed113ad6857d61684df5b9..aee96d82c1533aacfb996d01e1fb1f3af2062f82 100644
(file)
--- a/
sql/conditions.lisp
+++ b/
sql/conditions.lisp
@@
-25,7
+25,10
@@
set to :error to signal an error or :ignore/nil to silently ignore the warning."
(define-condition sql-condition ()
())
(define-condition sql-condition ()
())
-(define-condition sql-database-error (simple-error sql-condition)
+(define-condition sql-error (simple-error)
+ ())
+
+(define-condition sql-database-error (sql-error)
((error-id :initarg :error-id
:initform nil
:reader sql-error-error-id)
((error-id :initarg :error-id
:initform nil
:reader sql-error-error-id)
@@
-74,7
+77,7
@@
set to :error to signal an error or :ignore/nil to silently ignore the warning."
(define-condition sql-temporary-error (sql-database-error)
())
(define-condition sql-temporary-error (sql-database-error)
())
-(define-condition sql-user-error (s
imple-error sql-condition
)
+(define-condition sql-user-error (s
ql-error
)
((message :initarg :message
:initform "Unspecified error"
:reader sql-user-error-message))
((message :initarg :message
:initform "Unspecified error"
:reader sql-user-error-message))
@@
-86,14
+89,14
@@
set to :error to signal an error or :ignore/nil to silently ignore the warning."
;; Signal conditions
(defun signal-closed-database-error (database)
;; Signal conditions
(defun signal-closed-database-error (database)
- (cerror 'sql-connection-error
- :message
- (format nil "Trying to perform operation on closed database ~A."
- database)))
+ (error 'sql-connection-error
+ :database database
+ :message "Database is closed."))
(defun signal-no-database-error (database)
(defun signal-no-database-error (database)
- (error 'sql-database-error
- :message (format nil "Not a database: ~A." database)))
+ (error 'sql-database-error
+ :database database
+ :message (format nil "~A is not a database." database)))
;;; CLSQL Extensions
;;; CLSQL Extensions