sderr

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package sderr 错误处理

Index

Constants

This section is empty.

Variables

View Source
var (
	New    = eris.New
	Newf   = eris.Errorf
	Wrap   = eris.Wrap
	Wrapf  = eris.Wrapf
	Unwrap = eris.Unwrap
	Cause  = eris.Cause
	Is     = eris.Is
	As     = eris.As
)

export

View Source
var (
	Append = multierror.Append
)

Functions

func AsErr

func AsErr(v any) error

func AsT

func AsT[E error](err error) (E, bool)

func Combine

func Combine(errs []error) error

func NewWith

func NewWith(msg string, attrs ...any) error

func Scatter

func Scatter(err error) []error

func Sentinel

func Sentinel(text string) error

func WithStack

func WithStack(err error) error

func WrapWith

func WrapWith(err error, msg string, attrs ...any) error

Types

type Attr

type Attr struct {
	Key   string
	Value any
}

type Attrs

type Attrs map[string]any

type MultipleError

type MultipleError = multierror.Error

export types

type StackFrame

type StackFrame = eris.StackFrame

func StackOf

func StackOf(err error) []StackFrame

Directories

Path Synopsis
Package sdnotfounderr 检测常见包中的not found语意的错误
Package sdnotfounderr 检测常见包中的not found语意的错误

Jump to

Keyboard shortcuts

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