errors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IdentityError = F.Identity[error]

Functions

func As

func As[A error]() func(error) O.Option[A]

As tries to extract the error of desired type from the given error

func OnError

func OnError(msg string, args ...any) func(error) error

OnError generates a unary function that produces a formatted error. The argument to that function is the root cause of the error and the message will be augmented with a format string containing %w

func OnNone

func OnNone(msg string, args ...any) func() error

OnNone generates a nullary function that produces a formatted error

Types

This section is empty.

Jump to

Keyboard shortcuts

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