errors

package
v0.28.20240115133204 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSimplifyFunc = func(e error) string {
		if es := e.Error(); len(es) > 20 {
			return fmt.Sprintf("%.16s...\n", es)
		} else {
			return es + "\n"
		}
	}
)

Functions

func Catch

func Catch(e error, action string) bool

func ErrorFormat added in v0.28.20240114140844

func ErrorFormat(e error, format ...func(error) string) (s string)

func Join added in v0.28.20240114140844

func Join(e ...error) error

func Unwrap added in v0.28.20240114140844

func Unwrap(e error) []error

Types

type Error

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

func Grow

func Grow(e error, son Error) Error

func New

func New(reason string, action string) Error

func (Error) Error

func (t Error) Error() string

Jump to

Keyboard shortcuts

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