errorstack

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package errorstack captures creation-site stacks for unexpected errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture

func Capture(err error) error

Capture adds a stack unless the error already has one. Call it where an unexpected external error first enters Memento, then use standard %w wrapping above that point.

func CaptureContext

func CaptureContext(ctx context.Context, err error) error

CaptureContext leaves cancellation from ctx stackless and captures other errors. Use it for operations whose context controls expected cancellation.

func IsContextCancellation

func IsContextCancellation(ctx context.Context, err error) bool

IsContextCancellation reports whether every error branch represents the cancellation of ctx.

Types

This section is empty.

Jump to

Keyboard shortcuts

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