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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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