errors

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License: MIT Imports: 2 Imported by: 0

README

errors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DetailedError

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

func AsDetailedError

func AsDetailedError(err error) (*DetailedError, bool)

AsDetailedError attempts to cast the given error to a DetailedError instance.

func New

func New(op Op) *DetailedError

New creates a new error with the given Op and a default message: "Internal system error." The Cause is set to nil.

func (*DetailedError) Cause

func (e *DetailedError) Cause() error

Cause returns the cause of a DetailedError instance.

func (*DetailedError) Err

func (e *DetailedError) Err(err error) *DetailedError

Err sets the cause for a DetailedError instance.

func (*DetailedError) Error

func (e *DetailedError) Error() string

Error implements the error interface.

func (*DetailedError) Errorf

func (e *DetailedError) Errorf(format string, a ...any) *DetailedError

Errorf formats the error message for a DetailedError instance.

Syntactically the same as fmt.Errorf.

func (*DetailedError) Msg

func (e *DetailedError) Msg(msg string) *DetailedError

Msg sets the human-readable error message for a DetailedError instance.

func (*DetailedError) Msgf added in v0.0.5

func (e *DetailedError) Msgf(format string, a ...any) *DetailedError

func (*DetailedError) Op added in v0.0.4

func (e *DetailedError) Op() Op

Op returns the operation identifier associated with this error.

func (*DetailedError) Unwrap added in v0.0.3

func (e *DetailedError) Unwrap() error

Unwrap provides compatibility with the errors.Unwrap function.

type Error

type Error interface {
	error
}

type Op

type Op string

Jump to

Keyboard shortcuts

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