errors

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Wrap = errors.Wrapf
	Join = multierr.Combine
	Is   = errors.Is
	New  = errors.Errorf
)

Functions

func Assert added in v0.0.3

func Assert(condition bool, format string, args ...any)

func Unreachable added in v0.0.3

func Unreachable[T any](format string, args ...any) T

func Unreachable2 added in v0.0.3

func Unreachable2[T1, T2 any](format string, args ...any) (T1, T2)

func Unreachable3 added in v0.0.3

func Unreachable3[T1, T2, T3 any](format string, args ...any) (T1, T2, T3)

func Unreachable4 added in v0.0.3

func Unreachable4[T1, T2, T3, T4 any](format string, args ...any) (T1, T2, T3, T4)

func WithTag added in v0.0.3

func WithTag(err error, tags ...Tag) error

Types

type Info added in v0.0.3

type Info map[string]any

func (Info) AppendTo added in v0.0.3

func (info Info) AppendTo(message string) string

func (Info) String added in v0.0.3

func (info Info) String() string

func (Info) With added in v0.0.3

func (info Info) With(key string, val any) Info

type Tag added in v0.0.3

type Tag string
const (
	BadIndexAccess Tag = "BadIndexAccess"
	BadKeyAccess   Tag = "BadKeyAccess"
	Unsupported    Tag = "Unsupported"
	Unexpected     Tag = "Unexpected"
	BadConversion  Tag = "BadConversion"
	BadArgs        Tag = "BadArgs"
	BadState       Tag = "BadState"
	IOFailure      Tag = "IOFailure"
	DBFailure      Tag = "DBFailure"
	BadProtoBuf    Tag = "BadProtoBuf"
	BadJSON        Tag = "BadJSON"
	HTTPFailure    Tag = "HTTPFailure"
	GRPCFailure    Tag = "GRPCFailure"
)

func (Tag) Err added in v0.0.3

func (tag Tag) Err(err error) error

func (Tag) New added in v0.0.3

func (tag Tag) New(format string, args ...any) error

Jump to

Keyboard shortcuts

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