X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=base%2Fconditions.lisp;h=7fc778101abfa5bf01aa3f0feef7097f7eae9c4a;hb=43ec897ec7d84892fa59cc9b7858ce23d64a8a1a;hp=d1280dc7908e30fd8344b74641fdb99888aac8a2;hpb=fa071351835a2c754895cb917db9c63303e7b5c1;p=clsql.git diff --git a/base/conditions.lisp b/base/conditions.lisp index d1280dc..7fc7781 100644 --- a/base/conditions.lisp +++ b/base/conditions.lisp @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: conditions.lisp,v 1.2 2002/10/21 07:45:50 kevin Exp $ +;;;; $Id$ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -157,3 +157,26 @@ and signal an clsql-invalid-spec-error if they don't match." 'clsql-nodb-error :database database)) + +;; for USQL support + +(define-condition clsql-type-error (clsql-error clsql-condition) + ((slotname :initarg :slotname + :reader clsql-type-error-slotname) + (typespec :initarg :typespec + :reader clsql-type-error-typespec) + (value :initarg :value + :reader clsql-type-error-value)) + (:report (lambda (c stream) + (format stream + "Invalid value ~A in slot ~A, not of type ~A." + (clsql-type-error-value c) + (clsql-type-error-slotname c) + (clsql-type-error-typespec c))))) + +(define-condition clsql-sql-syntax-error (clsql-error) + ((reason :initarg :reason + :reader clsql-sql-syntax-error-reason)) + (:report (lambda (c stream) + (format stream "Invalid SQL syntax: ~A" + (clsql-sql-syntax-error-reason c))))) \ No newline at end of file