mirror of
https://github.com/corda/corda.git
synced 2025-01-29 15:43:55 +00:00
Merge pull request #3727 from corda/improved-error-message-for-missing-suspendable-cases
Added more descriptive error message for the cases when a transaction…
This commit is contained in:
commit
9bb9c6ae30
@ -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…
x
Reference in New Issue
Block a user