errs

package
v2.4.10 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture

func Capture(errPtr *error, errFunc func() error, msg string)

Capture runs errFunc and assigns the error, if any, to *errPtr. Preserves the original error by wrapping with errors.Join if the errFunc err is non-nil.

func CaptureGeneric

func CaptureGeneric[K any](errPtr *error, errFunc func(value K) error, value K, msg string)

CaptureGeneric runs errFunc with a generic type K and assigns the error, if any, to *errPtr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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