mirror of
https://github.com/corda/corda.git
synced 2025-03-18 10:05:28 +00:00
Changing exception thrown when accessing VaultService.rawUpdates from within a flow to a CordaRuntimeException
This commit is contained in:
parent
b5682e3a4e
commit
1319da6b50
@ -9,9 +9,9 @@ import com.r3.dbfailure.workflows.DbListenerService.MakeServiceThrowErrorFlow
|
||||
import com.r3.dbfailure.workflows.SendStateFlow
|
||||
import com.r3.transactionfailure.workflows.ErrorHandling
|
||||
import com.r3.transactionfailure.workflows.ErrorHandling.CheckpointAfterErrorFlow
|
||||
import net.corda.core.CordaRuntimeException
|
||||
import net.corda.core.contracts.StateAndRef
|
||||
import net.corda.core.contracts.UniqueIdentifier
|
||||
import net.corda.core.flows.FlowException
|
||||
import net.corda.core.flows.FlowLogic
|
||||
import net.corda.core.flows.StartableByRPC
|
||||
import net.corda.core.identity.Party
|
||||
@ -751,7 +751,7 @@ class VaultObserverExceptionTest {
|
||||
|
||||
val flowHandle = aliceNode.rpc.startFlow(::SubscribingRawUpdatesFlow)
|
||||
|
||||
assertFailsWith<FlowException>(
|
||||
assertFailsWith<CordaRuntimeException>(
|
||||
"Flow ${SubscribingRawUpdatesFlow::class.java.name} tried to access VaultService.rawUpdates " +
|
||||
"- Rx.Observables should only be accessed to outside the context of a flow "
|
||||
) {
|
||||
|
@ -2,10 +2,10 @@ package net.corda.node.services.vault
|
||||
|
||||
import co.paralleluniverse.fibers.Suspendable
|
||||
import co.paralleluniverse.strands.Strand
|
||||
import net.corda.core.CordaRuntimeException
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.crypto.containsAny
|
||||
import net.corda.core.flows.FlowException
|
||||
import net.corda.core.flows.HospitalizeFlowException
|
||||
import net.corda.core.internal.*
|
||||
import net.corda.core.messaging.DataFeed
|
||||
@ -223,7 +223,7 @@ class NodeVaultService(
|
||||
"- aborting the flow "
|
||||
)
|
||||
|
||||
throw FlowException(
|
||||
throw CordaRuntimeException(
|
||||
"Flow ${it.logic::class.java.name} tried to access VaultService.rawUpdates " +
|
||||
"- Rx.Observables should only be accessed to outside the context of a flow "
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user