errbook

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidArgument = errors.New("invalid argument")

ErrInvalidArgument is the errbook returned when the input is invalid.

View Source
var ErrTimeout = errors.New("timeout")

ErrTimeout is the errbook returned when the timeout is reached.

View Source
var ErrTimeoutUnsupported = errors.New("timeout is not supported in accessible mode")

ErrTimeoutUnsupported is the errbook returned when timeout is used while in accessible mode.

View Source
var ErrUserAborted = errors.New("user aborted")

ErrUserAborted is the errbook returned when a user exits the form before submitting.

Functions

func HandleError

func HandleError(err error)

func New

func New(format string, a ...any) error

func NewUserErrorf

func NewUserErrorf(format string, a ...any) error

NewUserErrorf is a user-facing errbook. this function is mostly to avoid linters complain about errbook starting with a capitalized letter.

func Wrap

func Wrap(reason string, err error) error

Types

type AiError

type AiError struct {
	// contains filtered or unexported fields
}

AiError is a wrapper around an errbook that adds additional context.

func (AiError) Error

func (m AiError) Error() string

func (AiError) Reason

func (m AiError) Reason() string

Jump to

Keyboard shortcuts

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