Renamed FlowSessionException to UnexpectedFlowEndException

This commit is contained in:
Shams Asari
2017-07-13 17:09:15 +01:00
parent 729eaed362
commit ae01d658b6
5 changed files with 14 additions and 14 deletions

View File

@ -25,6 +25,6 @@ open class FlowException(message: String?, cause: Throwable?) : CordaException(m
* that we were not expecting), or the other side had an internal error, or the other side terminated when we
* were waiting for a response.
*/
class FlowSessionException(message: String?, cause: Throwable?) : CordaRuntimeException(message, cause) {
class UnexpectedFlowEndException(message: String?, cause: Throwable?) : CordaRuntimeException(message, cause) {
constructor(msg: String) : this(msg, null)
}

View File

@ -71,7 +71,7 @@ class ContractUpgradeFlowTest {
// The request is expected to be rejected because party B hasn't authorised the upgrade yet.
val rejectedFuture = a.services.startFlow(ContractUpgradeFlow(atx!!.tx.outRef(0), DummyContractV2::class.java)).resultFuture
mockNet.runNetwork()
assertFailsWith(FlowSessionException::class) { rejectedFuture.getOrThrow() }
assertFailsWith(UnexpectedFlowEndException::class) { rejectedFuture.getOrThrow() }
// Party B authorise the contract state upgrade.
b.services.vaultService.authoriseContractUpgrade(btx!!.tx.outRef<ContractState>(0), DummyContractV2::class.java)
@ -141,7 +141,7 @@ class ContractUpgradeFlowTest {
DummyContractV2::class.java).returnValue
mockNet.runNetwork()
assertFailsWith(FlowSessionException::class) { rejectedFuture.getOrThrow() }
assertFailsWith(UnexpectedFlowEndException::class) { rejectedFuture.getOrThrow() }
// Party B authorise the contract state upgrade.
rpcB.authoriseContractUpgrade(btx!!.tx.outRef<ContractState>(0), DummyContractV2::class.java)