Documentation ¶
Index ¶
- func Except(err error, ignore ...error)
- func ExceptFn[T any](fn ErrorFn[T], ignore ...error) T
- func ExceptFn2[T, U any](fn ErrorFn2[T, U], ignore ...error) (T, U)
- func LastError() error
- func LastErrorWas(err error) bool
- func RegisterCallback(fn Callback)
- func RestoreCallback()
- type Callback
- type ErrorFn
- type ErrorFn2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExceptFn ¶
Handle error if not nil, and not among ignored ones Return anything from fn except for error if successful
func ExceptFn2 ¶
Handle error if not nil, and not among ignored ones Return anything from fn except for error if successful
func RestoreCallback ¶
func RestoreCallback()
Reset callback function to fmt.Fprintln(os.Stderr, err)
Types ¶
Click to show internal directories.
Click to hide internal directories.