mirror of
https://github.com/corda/corda.git
synced 2025-06-11 20:01:46 +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:
@ -188,7 +188,9 @@ class FlowStateMachineImpl<R>(override val id: StateMachineRunId,
|
|||||||
|
|
||||||
private fun checkDbTransaction(isPresent: Boolean) {
|
private fun checkDbTransaction(isPresent: Boolean) {
|
||||||
if (isPresent) {
|
if (isPresent) {
|
||||||
requireNotNull(contextTransactionOrNull)
|
requireNotNull(contextTransactionOrNull) {
|
||||||
|
"Transaction context is missing. This might happen if a suspendable method is not annotated with @Suspendable annotation."
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
require(contextTransactionOrNull == null)
|
require(contextTransactionOrNull == null)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user