// GetAndroidError show error counts of Android notification.
974867
func (s *Storage) GetAndroidError() int64 {
	var count int64
	s.getBoltDB(storage.AndroidErrorKey, &count)

	return count
}
482756
func (s *Storage) GetAndroidSuccess() int64 {
	var count int64
	s.getBuntDB(storage.AndroidSuccessKey, &count)

	return count
}
1056000
func MessageError(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "messageerror", Listener: listener}
}
1361708
func getError(res *http.Response) (*http.Response, error) {
	// Do nothing if the response is a successful 2xx
	if res.StatusCode/100 == 2 {
		return res, nil
	}
	var apiError ApiError
	// ReadAll is usually a bad practice, but here we need to read the response all
	// at once because we may attempt to use the data twice. It's preferable to use
	// methods that take io.Reader, e.g. json.NewDecoder
	body, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return nil, err
	}
	err = json.Unmarshal(body, &apiError)
	if err != nil {
		// If deserializing into ApiError fails, return a generic HttpError instead
		return nil, HttpError{res.StatusCode, string(body[:])}
	}
	apiError.HttpStatusCode = res.StatusCode
	return nil, apiError
}
863327
func NewError(code int, message string) ServiceError {
	return ServiceError{Code: code, Message: message}
}
1244941
func getErrors(ctx *macaron.Context) Errors {
	return ctx.GetVal(reflect.TypeOf(Errors{})).Interface().(Errors)
}
156409
func GetError(name string) (uint32, bool) {
	res, ok := AllErrors[name]
	return uint32(res), ok
}
66108
func getError(body []byte) error {
	var errResp ErrorResponse
	if err := json.Unmarshal(body, &errResp); err != nil {
		return err
	}
	return errResp.Error
}
1122425
func (c *Sender) AppendAndRepeatError(err error, repeat int) {
	c.appendAndRepeat(response{e: err}, repeat)
}
216613
func (h *ErrorVector) GetError(mode int) error {
	if len(h.errors) == 0 {
		return nil
	}

	return h.GetErrorList(mode)
}
843076
func checkForEmptyError(err error) error {
	if err != nil {
		return nil
	}
	msg := "attempted to notify Bugsnag without supplying an error. Bugsnag not notified"
	Config.Logger.Printf("ERROR: " + msg)
	return fmt.Errorf(msg)
}
386747
func (e UnknownServiceError) Error() string {
	extra := fmt.Sprintf("partition: %q, service: %q",
		e.Partition, e.Service)
	if len(e.Known) > 0 {
		extra += fmt.Sprintf(", known: %v", e.Known)
	}
	return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr())
}
291385
func GetInnerNonRetryableError(err error) error {
	for err != nil {
		if _, ok := err.(nonRetryableError); ok {
			return InnerError(err)
		}
		err = InnerError(err)
	}
	return nil
}
464802
func (s *Storage) GetIosError() int64 {
	var count int64
	s.getBuntDB(storage.IosErrorKey, &count)

	return count
}
1203842
func (cs *Stats) GetError() error {
	cs.mutex.Lock()
	defer cs.mutex.Unlock()
	return cs.err
}
1069198
func getAPIError(code APIErrorCode) APIError {
	if apiErr, ok := errorCodes[code]; ok {
		return apiErr
	}
	return errorCodes.ToAPIErr(ErrInternalError)
}
96185
func (api *Client) GetError(id string) (*Error, error) {
	result, _, err := api.makeRequest(http.MethodGet, fmt.Sprintf("%s/%s", api.concatUserPath(errorsPath), id), &Error{})
	if err != nil {
		return nil, err
	}
	return result.(*Error), nil
}