errors

package
v1.23.0-verio.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2018 License: BSD-3-Clause Imports: 10 Imported by: 87

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append added in v1.20.0

func Append(errs ...error) error

func Cause added in v1.20.0

func Cause(err error) error

func Code added in v1.20.0

func Code(err error) string

func ErrorFromContext added in v1.20.0

func ErrorFromContext(ctx context.Context) error

func ErrorInternal added in v1.20.0

func ErrorInternal(err error) error

func New

func New(detail string) error

func NewContextWithError added in v1.20.0

func NewContextWithError(ctx context.Context, err error) context.Context

func Newf

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

func Normalize added in v1.20.0

func Normalize(err error) error

func Prepared added in v1.20.0

func Prepared(code string, title string, detail string) error

func Preparedf added in v1.20.0

func Preparedf(code string, title string, format string, a ...interface{}) error

func Sanitize added in v1.20.0

func Sanitize(err error) error

func WithMeta added in v1.20.0

func WithMeta(err error, meta interface{}) error

func WithSource added in v1.20.0

func WithSource(err error, src Source) error

func Wrap

func Wrap(err error, detail string) error

func Wrapf

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

Types

type Caller added in v1.20.0

type Caller struct {
	Package  string `json:"package,omitempty" bson:"package,omitempty"`
	Function string `json:"function,omitempty" bson:"function,omitempty"`
	File     string `json:"file,omitempty" bson:"file,omitempty"`
	Line     int    `json:"line,omitempty" bson:"line,omitempty"`
}

func GetCaller added in v1.20.0

func GetCaller(frame int) *Caller

func (*Caller) FileName added in v1.20.0

func (c *Caller) FileName() string

func (*Caller) Normalize added in v1.20.0

func (c *Caller) Normalize(normalizer structure.Normalizer)

func (*Caller) PackageName added in v1.20.0

func (c *Caller) PackageName() string

func (*Caller) Parse added in v1.20.0

func (c *Caller) Parse(parser structure.ObjectParser)

func (*Caller) Validate added in v1.20.0

func (c *Caller) Validate(validator structure.Validator)

type Sanitizable added in v1.20.0

type Sanitizable interface {
	Sanitize() error
}

type Serializable added in v1.20.0

type Serializable struct {
	Error error
}

func (Serializable) GetBSON added in v1.20.0

func (s Serializable) GetBSON() (interface{}, error)

func (Serializable) MarshalJSON added in v1.20.0

func (s Serializable) MarshalJSON() ([]byte, error)

func (*Serializable) Normalize added in v1.20.0

func (s *Serializable) Normalize(normalizer structure.Normalizer)

func (*Serializable) Parse added in v1.20.0

func (s *Serializable) Parse(reference string, parser structure.ObjectParser)

func (*Serializable) SetBSON added in v1.20.0

func (s *Serializable) SetBSON(raw bson.Raw) error

func (*Serializable) UnmarshalJSON added in v1.20.0

func (s *Serializable) UnmarshalJSON(bytes []byte) error

func (*Serializable) Validate added in v1.20.0

func (s *Serializable) Validate(validator structure.Validator)

type Source added in v1.20.0

type Source interface {
	Parameter() string
	Pointer() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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