From ecc0560ebcfdb7c87518ae25e2744911490b80f8 Mon Sep 17 00:00:00 2001 From: Joel Dudley Date: Fri, 11 May 2018 10:46:46 +0100 Subject: [PATCH] Adds a clear error message from progress tracker requirement fails. (#3116) --- .../src/main/kotlin/net/corda/core/utilities/ProgressTracker.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/kotlin/net/corda/core/utilities/ProgressTracker.kt b/core/src/main/kotlin/net/corda/core/utilities/ProgressTracker.kt index bb58a0d1e3..f37cf3b5de 100644 --- a/core/src/main/kotlin/net/corda/core/utilities/ProgressTracker.kt +++ b/core/src/main/kotlin/net/corda/core/utilities/ProgressTracker.kt @@ -118,7 +118,7 @@ class ProgressTracker(vararg steps: Step) { if (currentStep == value) return val index = steps.indexOf(value) - require(index != -1) + require(index != -1, { "Step ${value.label} not found in progress tracker." }) if (index < stepIndex) { // We are going backwards: unlink and unsubscribe from any child nodes that we're rolling back