Skip to content

Commit

Permalink
Merge pull request korma#59 from felideon/master
Browse files Browse the repository at this point in the history
Better SQLException error message
  • Loading branch information
ibdknox committed May 2, 2012
2 parents 9186db9 + 0dfc3c2 commit c3bb272
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/korma/db.clj
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@
(println "Failure to execute query with SQL:")
(println sql " :: " params)
(cond
(instance? java.sql.SQLException e) (jdbc/print-sql-exception e)
(instance? java.sql.SQLException e) (jdbc/print-sql-exception (.getNextException e))
:else (.printStackTrace e))
(throw e))
(throw (.getNextException e)))

(defn- exec-sql [query]
(let [results? (:results query)
Expand Down

0 comments on commit c3bb272

Please sign in to comment.