'Collect errors generated by host checking tools.'

def GetCheckErrors(self, check_spec):

    errors = []
    try:
        check = checks.Check(**check_spec)
        check.Validate()
    except (checks.Error, filters.Error, hints.Error, type_info.Error) as e:
        errors.append(str(e))
    except Exception as e:
        errors.append(('Unknown    error    %s:    %s' % (type(e), e)))
    return errors
