aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorscgilardi <scgilardi@gmail.com>2009-06-06 05:36:30 +0000
committerscgilardi <scgilardi@gmail.com>2009-06-06 05:36:30 +0000
commit47fefa28e235e5fcd0377e1bd930eb05a6a9d23b (patch)
treed46e8b7cd80783a43e6191b0b9a7e2478d1c2f71 /src
parentdffe80714faa5a5b766cbde1ee8e6c04d229ed84 (diff)
sql.internal: use enhanced throwf from except
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