// HasError returns true if error occurs in form validation.
358257
func (c *Context) HasError() bool {
	hasErr, ok := c.Data["HasError"]
	if !ok {
		return false
	}
	c.Flash.ErrorMsg = c.Data["ErrorMsg"].(string)
	c.Data["Flash"] = c.Flash
	return hasErr.(bool)
}
33695
func (fer *FirstErrorRecorder) HasErrors() bool {
	fer.mu.Lock()
	defer fer.mu.Unlock()
	return fer.errorCount > 0
}
543884
func (d *Context) IsError(index int) bool {
	return int(C._duk_is_error(d.duk_context, C.duk_idx_t(index))) == 1
}
1056996
func IsFortressError(err error) bool {
	switch errors.Cause(err) {
	case ErrAborted, ErrShutdown:
		return true
	default:
		return false
	}
}
670053
func HasErrors() bool {
	if _, err := os.Stat(logFilePath); err == nil {
		return true
	}

	return false
}
984352
func IsHasAttachmentsError(err error) bool {
	_, ok := errors.Cause(err).(*HasAttachmentsError)
	return ok
}
1253779
func FromError(err error) (s *Status, ok bool) {
	if err == nil {
		return &Status{Code: codes.OK}, true
	}
	if s, ok := err.(*Status); ok {
		return s, true
	}
	return nil, false
}
1258747
func HasErrCode(err error, code ErrCode) bool {
	switch err := err.(type) {
	case *Err:
		return err.Code == code
	default:
		return false
	}
}
414929
func (v *RegexMatch) IsValid(errors *validate.Errors) {
	r := regexp.MustCompile(v.Expr)
	if r.Match([]byte(v.Field)) {
		return
	}

	if len(v.Message) > 0 {
		errors.Add(GenerateKey(v.Name), v.Message)
		return
	}

	errors.Add(GenerateKey(v.Name), fmt.Sprintf("%s does not match the expected format.", v.Name))
}
553350
func IsNotRegisteredError(err error) bool {
	if err == nil {
		return false
	}
	_, ok := err.(*notRegisteredErr)
	return ok
}
1177965
func IsRecordNotFoundError(err error) bool {
	if errs, ok := err.(Errors); ok {
		for _, err := range errs {
			if err == ErrRecordNotFound {
				return true
			}
		}
	}
	return err == ErrRecordNotFound
}
1097351
func isAwsError(err error, code string) bool {
	if err, ok := err.(awserr.Error); ok && err.Code() == code {
		return true
	}
	return false
}
1332802
func IsHTTPError(err error) bool {
	cause := errors.Cause(err)
	if nErr, ok := cause.(HTTPError); ok {
		return nErr.HTTPError()
	}

	return false
}
1020770
func IsHasContainersError(err error) bool {
	_, ok := errors.Cause(err).(*HasContainersError)
	return ok
}
903446
func IsExifError(err error) bool {
	if te, ok := err.(tiffErrors); ok {
		_, isExif := te[loadExif]
		return isExif
	}
	return false
}
538622
func Error(responseWriter http.ResponseWriter, statusCode int, err error) bool {
	if err != nil {
		http.Error(responseWriter, err.Error(), statusCode)
		return true
	}
	return false
}
999132
func IsErrorWithCode(err error, desiredResultCode uint8) bool {
	if err == nil {
		return false
	}

	serverError, ok := err.(*Error)
	if !ok {
		return false
	}

	return serverError.ResultCode == desiredResultCode
}