Skip to content
Snippets Groups Projects
Unverified Commit b9464c30 authored by Cal Herries's avatar Cal Herries Committed by GitHub
Browse files

Simple sync exceptions (#41066)

parent 1c42af37
No related branches found
No related tags found
No related merge requests found
......@@ -192,7 +192,7 @@
(do
(log/warn e message)
e)
(throw (ex-info (format "%s: %s" message (ex-message e)) {:f f} e)))))))
(throw e))))))
(defmacro with-error-handling
"Execute `body` in a way that catches and logs any Exceptions thrown, and returns `nil` if they do so. Pass a
......@@ -464,7 +464,7 @@
(do
(log/warn e (format "Error running step ''%s'' for %s" step-name (name-for-logging database)))
{:throwable e})
(throw (ex-info (format "Error in sync step %s: %s" step-name (ex-message e)) {} e)))))))
(throw e))))))
end-time (t/zoned-date-time)]
[step-name (assoc results
:start-time start-time
......
......@@ -156,10 +156,7 @@
(catch Throwable e
(log/errorf e "create-database! failed; destroying %s database %s" driver (pr-str database-name))
(tx/destroy-db! driver database-definition)
(throw (ex-info (format "Failed to create %s '%s' test database: %s" driver database-name (ex-message e))
{:driver driver
:database-name database-name}
e)))))
(throw e))))
(defn- create-database-with-bound-settings! [driver dbdef]
(letfn [(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