X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Fobjects.lisp;h=1c309751883cefc56a3f168088d01b75c9d1c5c4;hp=8fa98903a85450c436d20258b91cdb4c81345c68;hb=8c6c643e3debe875bd14408cc3129d8148dfd125;hpb=5be31565b7d87b90f0e79a9e61af84ad05e12920 diff --git a/sql/objects.lisp b/sql/objects.lisp index 8fa9890..1c30975 100644 --- a/sql/objects.lisp +++ b/sql/objects.lisp @@ -317,10 +317,10 @@ superclass of the newly-defined View Class." (basetype (if (listp slot-type) (car slot-type) slot-type))) (when (and slot-type val) (unless (typep val basetype) - (error 'clsql-type-error - :slotname (slot-definition-name slotdef) - :typespec slot-type - :value val))))) + (error 'sql-user-error + :message + (format nil "Invalid value ~A in slot ~A, not of type ~A." + val (slot-definition-name slotdef) slot-type)))))) ;; ;; Called by find-all @@ -423,7 +423,7 @@ superclass of the newly-defined View Class." (let ((qualifier (key-qualifier-for-instance instance :database vd))) (delete-records :from vt :where qualifier :database vd) (setf (slot-value instance 'view-database) nil)) - (error 'clsql-no-database-error :database nil)))) + (signal-no-database-error vd)))) (defmethod update-instance-from-records ((instance standard-db-object) &key (database *default-database*))