throwIfErrors method
void
throwIfErrors()
Throws an exception if there are any errors
Implementation
void throwIfErrors() {
if (hasErrors) {
throw ValidationException(
'Validation failed with ${_errors.length} errors',
_errors,
);
}
}