Skip to content

Instantly share code, notes, and snippets.

@alexanderjamesking
Created March 26, 2020 17:40
Show Gist options
  • Save alexanderjamesking/497834c9ed6dc6b6f5e951fdfff6be16 to your computer and use it in GitHub Desktop.
Save alexanderjamesking/497834c9ed6dc6b6f5e951fdfff6be16 to your computer and use it in GitHub Desktop.
(try
(d/catch (d/chain (throw (ex-info "standard failure" {:type :foo})))
(fn [e]
(println "d/catch e" (.getMessage e))))
(catch Exception e
(println "try/catch e" (.getMessage e))))
(try
(d/catch (d/chain (d/error-deferred (ex-info "deferred error" {:type :bar})))
(fn [e]
(println "d/catch e" (.getMessage e))))
(catch Exception e
(println "try/catch e" (.getMessage e))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment