Improve log message

This commit is contained in:
Kyriakos Tharrouniatis 2020-02-13 15:49:27 +00:00
parent c8566d2cf9
commit db8457ef3f
2 changed files with 6 additions and 4 deletions

View File

@ -750,7 +750,7 @@ class VaultObserverExceptionTest {
val future = aliceNode.rpc.startFlow(ErrorHandling::SubscribingRawUpdatesFlow).returnValue
assertFailsWith<CordaRuntimeException>("Cannot subscribe to NodeVaultService.rawUpdates from a flow!") {
assertFailsWith<CordaRuntimeException>("Flow tried to subscribe an Rx.Observer to VaultService.rawUpdates - the subscription did not succeed ") {
future.getOrThrow(30.seconds)
}
}
@ -758,7 +758,7 @@ class VaultObserverExceptionTest {
//TODO add retry from checkpoint test
@Test
fun `Failing Observer wrapped with FlowSafeSubscriber will remain and re-called upon flow retry`() {
fun `Failing Observer wrapped with FlowSafeSubscriber will survive and be re-called upon flow retry`() {
}

View File

@ -217,10 +217,12 @@ class NodeVaultService(
// flow's properties, essentially to fiber's properties then, since it does not unsubscribes on flow's/ fiber's completion,
// it could prevent the flow/ fiber swapped our of memory.
PreventSubscriptionsSubject(_rawUpdatesPublisher) {
log.error("Cannot subscribe to NodeVaultService.rawUpdates from a flow! " +
log.error("Flow tried to subscribe an Rx.Observer to VaultService.rawUpdates " +
"- the subscription did not succeed " +
"- aborting the flow ")
throw FlowException("Cannot subscribe to NodeVaultService.rawUpdates from a flow! ")
throw FlowException("Flow tried to subscribe an Rx.Observer to VaultService.rawUpdates " +
"- the subscription did not succeed ")
}
} else {
// we are not inside a flow; we are most likely inside a CordaService,