mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-10-17 13:20:27 +00:00
small logic fix in transactions dsl
This commit is contained in:
@@ -63,7 +63,7 @@ suspend fun <T> TransactionsDSL.rollbackableOperation(
|
||||
* @param onRollbackStepError Will be called if rollback action throwing some error
|
||||
*/
|
||||
suspend fun <T> doSuspendTransaction(
|
||||
onRollbackStepError: suspend (TransactionDSLRollbackLambda, Throwable) -> Unit = { _, _ -> },
|
||||
onRollbackStepError: suspend (Throwable) -> Unit = { },
|
||||
block: suspend TransactionsDSL.() -> T
|
||||
): Result<T> {
|
||||
val transactionsDSL = TransactionsDSL()
|
||||
@@ -75,7 +75,7 @@ suspend fun <T> doSuspendTransaction(
|
||||
runCatching {
|
||||
it.invoke(e)
|
||||
}.onFailure { ee ->
|
||||
onRollbackStepError(it, ee)
|
||||
onRollbackStepError(ee)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user