throwExceptionOnErrors method
void
throwExceptionOnErrors()
inherited
Throws a UsageException
with error and correct usage information
if there were any errors during configuration resolution.
Can be overridden to change the exception or its content.
Implementation
void throwExceptionOnErrors() {
if (_errors.isNotEmpty) {
final buffer = StringBuffer();
final errors = _errors.map(formatConfigError);
buffer.writeAll(errors, '\n');
throw UsageException(buffer.toString(), usage);
}
}