failure

package module
v0.0.0-...-dd5a97a Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 3 Imported by: 7

README

failure


Copyright (c) 2024 Archivage Numérique

Documentation

Index

Constants

View Source
const (
	NoError = Sentinel("no error")
)

Variables

This section is empty.

Functions

func As

func As(err error, target any) bool

func Is

func Is(err, target error) bool

func Join

func Join(merr ...error) error

func Unwrap

func Unwrap(err error) error

func Wrap

func Wrap(cause, err error) error

Types

type Failure

type Failure struct {
	Cause   error
	Message string
}

func New

func New(msg string, kv ...any) *Failure

func WithMessage

func WithMessage(cause error, msg string, kv ...any) *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