errtrace

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package errtrace provides error wrapping with stack trace capture.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

func Errorf(format string, args ...interface{}) error

Errorf creates a new formatted error with stack trace.

func IsError

func IsError(err error, target error) bool

IsError checks if two errors are the same type.

func New

func New(err error) error

New wraps an existing error with stack trace.

func PrintErrorWithEncoder

func PrintErrorWithEncoder(err error, encoder func(v interface{}) error)

PrintErrorWithEncoder prints an error using the given encoder.

func Recover

func Recover(r interface{}) error

Recover creates an error from a recovered panic value.

func WithStackTrace

func WithStackTrace(err error) error

WithStackTrace wraps an error with stack trace information.

func WithStackTraceAndPrefix

func WithStackTraceAndPrefix(err error, format string, args ...interface{}) error

WithStackTraceAndPrefix wraps an error with a formatted message prefix and stack trace.

Types

This section is empty.

Jump to

Keyboard shortcuts

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