small logic fix in transactions dsl

This commit is contained in:
2025-03-20 18:04:19 +06:00
parent 0515b49b98
commit 4b7d65e8b4

View File

@@ -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)
}
}
}