// ErrorInternal does Error 500.
2233
func ErrorInternal(responseWriter http.ResponseWriter, err error) bool {
	return Error(responseWriter, http.StatusInternalServerError, err)
}
412965
func InternalErrorf(format string, params ...interface{}) error {
	return internal(fmt.Sprintf(format, params...))
}
813162
func (r *Response) getInternalReader() io.Reader {
	if r.buffer.Len() != 0 {
		return r.buffer
	}
	return r
}
619919
func globalErrorCallback(err C.virErrorPtr) {
	globalErrorMutex.RLock()
	defer globalErrorMutex.RUnlock()
	if globalErrorContext.cb != nil {
		globalErrorContext.cb(newError(err), globalErrorContext.f)
	}
}
164106
func (err MultiError) NilOrError() error {
	if len(err) == 0 {
		return nil
	} else if len(err) == 1 {
		return err[0]
	}
	return err
}
1101082
func NewInternalError(err error) error {
	return &StatusError{unversioned.Status{
		Status: unversioned.StatusFailure,
		Code:   http.StatusInternalServerError,
		Reason: unversioned.StatusReasonInternalError,
		Details: &unversioned.StatusDetails{
			Causes: []unversioned.StatusCause{{Message: err.Error()}},
		},
		Message: fmt.Sprintf("Internal error occurred: %v", err),
	}}
}
700764
func (v *requiredRule) Error(message string) *requiredRule {
	return &requiredRule{
		message: message,
		skipNil: v.skipNil,
	}
}
386914
func (m *manager) setInternal(id kubecontainer.ContainerID, result Result) bool {
	m.Lock()
	defer m.Unlock()
	prev, exists := m.cache[id]
	if !exists || prev != result {
		m.cache[id] = result
		return true
	}
	return false
}
766299
func (entry *Entry) Error(args ...interface{}) {
	if entry.lgEntry.Logger.Level >= lg.ErrorLevel {
		entry.lgEntry.WithFields(entry.fields).Error(args...)
	}
}
441286
func (n *Node) errorHandler(ctx context.Context, err error) {
	n.logger.WithField("error", err).Info("error occurred")
}
64889
func NewErrorGroupOrNil(errors []error) error {
	if len(errors) == 0 {
		return nil
	} else if len(errors) == 1 {
		return errors[0]
	} else {
		return &ErrorGroup{Errors: errors}
	}
}
851166
func (sid *Shortid) GenerateInternal(tm *time.Time, epoch time.Time) (string, error) {
	ms, count := sid.getMsAndCounter(tm, epoch)
	idrunes := make([]rune, 9)
	if tmp, err := sid.abc.Encode(ms, 8, 5); err == nil {
		copy(idrunes, tmp) // first 8 symbols
	} else {
		return "", err
	}
	if tmp, err := sid.abc.Encode(sid.worker, 1, 5); err == nil {
		idrunes[8] = tmp[0]
	} else {
		return "", err
	}
	if count > 0 {
		if countrunes, err := sid.abc.Encode(count, 0, 6); err == nil {
			// only extend if really need it
			idrunes = append(idrunes, countrunes...)
		} else {
			return "", err
		}
	}
	return string(idrunes), nil
}
242786
func NewInternalErrorf(cause error, context interface{}, format string, args ...interface{}) Error {
	if format == "" {
		format = fmt.Sprintf("Internal Error: %s", context)
	}
	return makeErrorf(InternalErrorError, cause, format, args...)
}
1325556
func (l *Slog) ErrorLevel() *Slog {
	l = l.copy()
	l.Log.Priority = ErrorPrio
	return l
}
798381
func SCCAllowsFSTypeInternal(scc *securityapi.SecurityContextConstraints, fsType securityapi.FSType) bool {
	if scc == nil {
		return false
	}

	for _, v := range scc.Volumes {
		if v == fsType || v == securityapi.FSTypeAll {
			return true
		}
	}
	return false
}
1027422
func NewInternalError(field *FieldPath, err error) *Error {
	return &Error{ErrorTypeInternal, field.String(), nil, err.Error()}
}
897982
func isAllowedInternal(c context.Context) bool {
	settings := common.GetSettings(c)
	if settings.Buildbot.InternalReader == "" {
		return false
	}
	allowed, err := auth.IsMember(c, settings.Buildbot.InternalReader)
	if err != nil {
		logging.WithError(err).Errorf(c, "IsMember(%q) failed", settings.Buildbot.InternalReader)
		allowed = false
	}
	return allowed
}