Adds a clear error message from progress tracker requirement fails. (#3116)

This commit is contained in:
Joel Dudley
2018-05-11 10:46:46 +01:00
committed by GitHub
parent 76b0f75ea3
commit ecc0560ebc

View File

@ -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