1.2.0 permalink Arrow_down_16x16

print-sql-exception

clojure.contrib.sql.internal

  • (print-sql-exception stream exception)
Prints the contents of an SQLException to stream

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/sql/internal.clj:107 top

(defn print-sql-exception
  "Prints the contents of an SQLException to stream"
  [stream exception]
  (.println
   stream
   (format (str "%s:" \newline
                " Message: %s" \newline
                " SQLState: %s" \newline
                " Error Code: %d")
           (.getSimpleName (class exception))
           (.getMessage exception)
           (.getSQLState exception)
           (.getErrorCode exception))))
Vars in clojure.contrib.sql.internal/print-sql-exception: class defn format str
Used in 0 other vars

Comments top

No comments for print-sql-exception. Log in to add a comment.