aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clojure/contrib/sql/internal.clj7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/clojure/contrib/sql/internal.clj b/src/clojure/contrib/sql/internal.clj
index b4ad2b33..03880ec5 100644
--- a/src/clojure/contrib/sql/internal.clj
+++ b/src/clojure/contrib/sql/internal.clj
@@ -14,7 +14,7 @@
(ns clojure.contrib.sql.internal
(:use
(clojure.contrib
- [except :only (throw-arg)]
+ [except :only (throwf throw-arg)]
[java-utils :only (as-properties)]
[seq-utils :only (indexed)]))
(:import
@@ -39,7 +39,7 @@
"Returns the current database connection (or throws if there is none)"
[]
(or (find-connection*)
- (throw (Exception. "no current database connection"))))
+ (throwf "no current database connection")))
(defn rollback
"Accessor for the rollback flag on the current connection"
@@ -132,8 +132,7 @@
"Sets rollback and throws a wrapped exception"
[e]
(rollback true)
- (throw
- (Exception. (format "transaction rolled back: %s" (.getMessage e)) e)))
+ (throwf e "transaction rolled back: %s" (.getMessage e)))
(defn transaction*
"Evaluates func as a transaction on the open database connection. Any