Skip to content
Snippets Groups Projects
Unverified Commit 01a9255d authored by appleby's avatar appleby Committed by GitHub
Browse files

Do not ignore-errors in pprint-native-query-with-best-strategy (#48246)

Return a description of the Exception that occurred instead.

This is helpful for debugging if query->raw-native-query throws an exception.
parent 5ce94838
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,7 @@
(pprint-native-query-with-best-strategy (or driver/*driver* :h2) query))
([driver query]
(u/ignore-exceptions
(try
(let [{native :query, :as query} (query->raw-native-query query)]
(str "\nNative Query =\n"
(cond
......@@ -135,7 +135,9 @@
\newline
\newline
(u/pprint-to-str (dissoc query :query))
\newline)))))
\newline))
(catch Exception e
(str "Unable to pprint native query:\n" query "\n" e)))))
(defn do-with-native-query-testing-context
[query thunk]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment