X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Ftransaction.lisp;h=286839be9d3bb4d20d5e480be0393787d666ece5;hp=b0b5137956ef82061778d90ac821bb3e3c531902;hb=e622ee6f4bf2b9fe81af59d566e651c983a4833b;hpb=4c89485f5cdb21a334de9c35adfded30db0c75e7 diff --git a/sql/transaction.lisp b/sql/transaction.lisp index b0b5137..286839b 100644 --- a/sql/transaction.lisp +++ b/sql/transaction.lisp @@ -47,17 +47,17 @@ (when (zerop (decf (transaction-level database))) (execute-command "COMMIT" :database database) (map nil #'funcall (commit-hooks (transaction database)))) - (warn 'clsql-simple-warning + (warn 'sql-warning :format-control "Cannot commit transaction against ~A because there is no transaction in progress." :format-arguments (list database)))) -(defmethod database-abort-transaction (database) +(defmethod database-abort-transaction ((database database)) (if (> (transaction-level database) 0) (when (zerop (decf (transaction-level database))) (unwind-protect (execute-command "ROLLBACK" :database database) (map nil #'funcall (rollback-hooks (transaction database))))) - (warn 'clsql-simple-warning + (warn 'sql-warning :format-control "Cannot abort transaction against ~A because there is no transaction in progress." :format-arguments (list database))))