Show error msg rather than fail silently when running a flow with no progress tracker from the shell.

This commit is contained in:
joeldudleyr3 2017-08-31 22:38:33 +01:00
parent 03ddaaac11
commit ebbca94d67

View File

@ -293,6 +293,10 @@ object InteractiveShell {
continue continue
} }
val flow = ctor.newInstance(*args) as FlowLogic<*> val flow = ctor.newInstance(*args) as FlowLogic<*>
if (flow.progressTracker == null) {
errors.add("You must override the flow's progress tracker to run it from the shell")
continue
}
return invoke(flow) return invoke(flow)
} catch(e: StringToMethodCallParser.UnparseableCallException.MissingParameter) { } catch(e: StringToMethodCallParser.UnparseableCallException.MissingParameter) {
errors.add("${getPrototype()}: missing parameter ${e.paramName}") errors.add("${getPrototype()}: missing parameter ${e.paramName}")