mirror of
https://github.com/corda/corda.git
synced 2025-01-18 18:56:28 +00:00
Added more descriptive error message for the cases when a transaction context is missing from the flow state machine
This commit is contained in:
parent
494661cc0c
commit
d0ecab0781
@ -188,7 +188,9 @@ class FlowStateMachineImpl<R>(override val id: StateMachineRunId,
|
||||
|
||||
private fun checkDbTransaction(isPresent: Boolean) {
|
||||
if (isPresent) {
|
||||
requireNotNull(contextTransactionOrNull)
|
||||
requireNotNull(contextTransactionOrNull) {
|
||||
"Transaction context is missing. This might happen if a suspendable method is not annotated with @Suspendable annotation."
|
||||
}
|
||||
} else {
|
||||
require(contextTransactionOrNull == null)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user