parse static method
Implementation
static ErrorPolicy parse(dynamic raw, {String label = 'on-error'}) {
switch (raw?.toString().trim().toLowerCase()) {
case null:
case '':
case 'continue':
return ErrorPolicy.continueRun;
case 'stop':
case 'fail-fast':
return ErrorPolicy.stop;
default:
throw ArgumentError(
"$label must be 'continue' or 'stop', got '$raw'.",
);
}
}