errors

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 6 Imported by: 5

README

go-errors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(msg string) error

New returns error with caller

func Newf

func Newf(msg string, a ...interface{}) error

New returns error with caller

func Newff

func Newff(fields Fields, msg string, a ...interface{}) error

New returns error with caller

func Wrap

func Wrap(err error, msg string) error

Wrap returns error wrapped by caller info if 'err' is not nil

func Wrapf

func Wrapf(err error, msg string, a ...interface{}) error

Wrapf returns error wrapped by message and caller info if 'err' is not nil

func Wrapff

func Wrapff(err error, fields Fields, msg string, a ...interface{}) error

Wrapf returns error wrapped by message and caller info if 'err' is not nil

Types

type Fields

type Fields map[string]interface{}

type Message

type Message interface {
	Message() string
}

func NewM

func NewM(msg string) Message

New returns error with caller

func NewMf

func NewMf(msg string, a ...interface{}) Message

New returns error with caller

func NewMff

func NewMff(fields Fields, msg string, a ...interface{}) Message

New returns error with caller

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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