errors

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Except

func Except(err error, ignore ...error)

func ExceptFn

func ExceptFn(fn ErrorFn, ignore ...error)

func ExceptFn2

func ExceptFn2[T any](fn ErrorFn2[T], ignore ...error) T

func ExceptFn3

func ExceptFn3[T, U any](fn ErrorFn3[T, U], ignore ...error) (T, U)

func LastError

func LastError() error

func LastErrorWas

func LastErrorWas(err error) bool

func RegisterCallback

func RegisterCallback(fn Callback)

func RestoreCallback

func RestoreCallback()

Types

type Callback

type Callback func(error)

type ErrorFn

type ErrorFn func() error

func W

func W(err error) ErrorFn

type ErrorFn2

type ErrorFn2[T any] func() (T, error)

func W2

func W2[T any](t T, err error) ErrorFn2[T]

type ErrorFn3

type ErrorFn3[T, U any] func() (T, U, error)

func W3

func W3[T, U any](t T, u U, err error) ErrorFn3[T, U]

Jump to

Keyboard shortcuts

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