errors

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 10

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

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

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

func New

func New(msg string) error

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

func Status

func Status(status int, msg string) error

Status returns a new error with the designated HTTP status.

func Statusf

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

Statusf returns a new error with the designated HTTP status.

func Wrap

func Wrap(err error, msg string) error

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

func WrapStatus

func WrapStatus(status int, err error) error

WrapStatus bundles an existing error with a status code.

func Wrapf

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL