Created
May 13, 2014 01:42
-
-
Save MichaelDrogalis/cd250905bba75741f77e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn run-query [q] | |
| (info "Executing query: " q) | |
| (try | |
| (if-not (nil? q) | |
| (let [result (database/query *db* q)] | |
| (metrics/record-db-hit) | |
| {:error :nil-query}) | |
| (catch Exception e | |
| (warn "Error issuing query" q) | |
| {:error :database-error}))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for this compact example of complected code. I think there's a missing line between 6 and 7:
result)