Created
December 1, 2015 18:46
-
-
Save mdelaurentis/d3b51cbdc9d40932df18 to your computer and use it in GitHub Desktop.
This file contains 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
;; Good | |
(try | |
(insert-a-batch …) | |
(publish-message {:type “redshift-connection”, :state “ok”, :client_id 3, :connection_id 123, :created-at “…”}) | |
(catch DiskFullError e | |
(publish-message {”redshift-connection”, :state “error”, :client_id 3, “error-type “disk full”, :created-at "..."})) | |
(catch ConnectionError e | |
(publish-message {”redshift-connection”, :state “error”, :client_id 3, “error-type “connection error”, :created-at "..."}))) | |
;; Bad | |
(try | |
(insert-a-batch …) | |
(publish-message {:type “redshift-disk-full”, :state “ok”, :client_id 3, :connection_id 123, :created-at “…”}) | |
(publish-message {:type “redshift-connection-error”, :state “ok”, :client_id 3, :connection_id 123, :created-at “…”}) | |
(catch DiskFullError e | |
(publish-message {:type ”redshift-disk-full”, :state “error”, :client_id 3, :created-at "..."}) | |
(publish-message {:type ”redshift-connection-error”, :state “ok”, :client_id 3, :created-at "..."})) | |
(catch ConnectionError e | |
(publish-message {:type ”redshift-disk-full”, :state “ok”, :client_id 3, :created-at "..."}) | |
(publish-message {:type ”redshift-connection-error”, :state “error”, :client_id 3, :created-at "..."}))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment