Created
January 9, 2024 17:05
-
-
Save igrishaev/1050a5cfe03f8f3c3ca49734ae3053e1 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
(try | |
(let [result# (do ~@body)] | |
~(if rollback? | |
`(.rollback ~bind) | |
`(.commit ~bind)) | |
result#) | |
(catch Throwable e# | |
(.rollback ~bind) | |
(throw e#))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment