Last active
August 22, 2023 03:17
-
-
Save mcsee/a4fc40e63f2506bf02144c9f71f164a3 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 { | |
transaction.commit(); | |
} catch (transactionError) { | |
this.withTransactionErrorDo( | |
transationError, transaction); | |
} | |
// transaction error policy is not defined in this function | |
// so you don't have repeated code and code is more readable | |
// It is up to the transaction and the error to decide what to do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment