faults

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: BSD-2-Clause Imports: 4 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 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 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