kivik: Index | Files

package errors

import ""

Package errors provides convenience functions for Kivik drivers to report meaningful errors. This package is not conisidered part of the kivik public API and is subject to change without notice.


Package Files

errors.go status.go

func Errorf Uses

func Errorf(format string, args ...interface{}) error

Errorf is a wrapper around pkg/errors.Errorf()

func New Uses

func New(msg string) error

New is a wrapper around the standard errors.New, to avoid the need for multiple imports.

func Status Uses

func Status(status int, msg string) error

Status returns a new error with the designated HTTP status.

func Statusf Uses

func Statusf(status int, format string, args ...interface{}) error

Statusf returns a new error with the designated HTTP status.

func Wrap Uses

func Wrap(err error, msg string) error

Wrap is a wrapper around pkg/errors.Wrap()

func WrapStatus Uses

func WrapStatus(status int, err error) error

WrapStatus bundles an existing error with a status code.

func Wrapf Uses

func Wrapf(err error, format string, args ...interface{}) error

Wrapf is a wrapper around pkg/errors.Wrapf()

Package errors imports 3 packages (graph) and is imported by 13 packages. Updated 2019-04-05. Refresh now. Tools for package owners.