stack

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package stack is an error wrapper and put it to a stack using passed context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v0.24.0

func Init(ctx context.Context) context.Context

Init to init context so it can be used as error stack.

func Wrap added in v0.24.0

func Wrap(ctx context.Context, originalErr error, maskedErrs ...error) error

Wrap to put the errors in the stack in the initiated context.

Will return the last of maskedErrs.

Types

type ErrStack added in v0.24.0

type ErrStack struct {
	File     string `json:"file"`
	Function string `json:"function"`
	Message  string `json:"message"`
}

ErrStack is error stack.

func Get added in v0.24.0

func Get(ctx context.Context) []ErrStack

Get to get error stacks.

Jump to

Keyboard shortcuts

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