failure

package
v0.0.0-...-04135fb Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoError  = Sentinel("no error")
	NotFound = Sentinel("not found")
)

Variables

This section is empty.

Functions

func Wrap

func Wrap(cause, err error) error

Types

type Failure

type Failure struct {
	Cause   error
	Message string
}

func New

func New(msg string, kvs ...kv.KeyValue) *Failure

func WithMessage

func WithMessage(cause error, msg string, kvs ...kv.KeyValue) *Failure

func (*Failure) Error

func (f *Failure) Error() string

func (*Failure) Unwrap

func (f *Failure) Unwrap() error

type Sentinel

type Sentinel string

Sentinel constant-errors

func (Sentinel) Error

func (s Sentinel) Error() string

Jump to

Keyboard shortcuts

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