errors

package
v2.23.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(msg string) error

func WithStack

func WithStack(err error) error

func Wrap

func Wrap(err error, msg string) error

Types

type Error

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

func (*Error) Error

func (e *Error) Error() string

func (*Error) Format

func (e *Error) Format(s fmt.State, verb rune)

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorHandler added in v2.23.0

type ErrorHandler struct {
	slog.Handler
}

func (*ErrorHandler) Handle added in v2.23.0

func (h *ErrorHandler) Handle(ctx context.Context, r slog.Record) error

type Frame

type Frame uintptr

func Stack

func Stack(err error) []Frame

func (Frame) Format

func (f Frame) Format(s fmt.State, verb rune)

Format implements fmt.Formatter. Supported verbs:

%v  - short file:line
%+v - full file:line with function name
%s  - file:line
%n  - function name only

Jump to

Keyboard shortcuts

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