faults

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: BSD-2-Clause Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxDepth = 50

Functions

func Cause

func Cause(err error) error

func Error

func Error(err error) string

func Has

func Has(err error, test error) bool

func Join added in v0.3.0

func Join(errs ...error) error

func New

func New(template string, args ...interface{}) error

func WithStack

func WithStack(cause error) error

func WithStackf

func WithStackf(cause error, template string, args ...interface{}) error

func Wrap

func Wrap(cause error) error

func Wrapf

func Wrapf(cause error, template string, args ...interface{}) error

Types

type Causer

type Causer interface {
	Cause() error
}

type CompositeError added in v0.3.0

type CompositeError struct {
	Err1 error
	Err2 error
}

func (*CompositeError) As added in v0.3.0

func (e *CompositeError) As(target interface{}) bool

func (*CompositeError) Error added in v0.3.0

func (e *CompositeError) Error() string

func (*CompositeError) Is added in v0.3.0

func (e *CompositeError) Is(target error) bool

func (*CompositeError) Unwrap added in v0.3.0

func (e *CompositeError) Unwrap() error

type Errors

type Errors []error

func (Errors) Add

func (errs Errors) Add(e error)

func (Errors) Error

func (errs Errors) Error() string

type Fault

type Fault struct {
	// contains filtered or unexported fields
}

func (*Fault) Cause

func (err *Fault) Cause() error

func (*Fault) Error

func (err *Fault) Error() string

func (*Fault) Format

func (e *Fault) Format(s fmt.State, verb rune)

Format implements the interface https://golang.org/pkg/fmt/#Formatter eg: https://github.com/go-stack/stack/blob/master/stack.go#L85

func (*Fault) Stack

func (err *Fault) Stack() string

Jump to

Keyboard shortcuts

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