errors

package
v0.0.0-...-bbc86cb Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OkStackErr = StackError{/* contains filtered or unexported fields */}

Functions

func By

func By(err error) error

ByEx creates a new stack error with std error

func Format

func Format(format string, v ...interface{}) error

FormatEx creates a new stack error that is formatted by `format v...`

func IsNil

func IsNil(err error) bool

func NewStackError

func NewStackError(txt string) error

func WithMessage

func WithMessage(err error, format string, v ...interface{}) error

WithMessageEx creates a new stack error with err that is formatted by `format v...`

func Wrap

func Wrap(err error) error

Types

type StackError

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

StackError out a chain link error. Example: chain1 = errChain { err: errors.New("hello word"), msg: "chain1"} chain2 = errChain {err: chain1, msg: "chain2"} chain3 = errChain {err: chain2, msg: "chain3"} stackError = StackError {errChain: chain3, stackPtrs: []uintptr} stdout: err: "hello word" msg:

chain1,
	chain2,
		chain3

stacktrace:

func (*StackError) Error

func (stackErr *StackError) Error() string

func (*StackError) IsNil

func (stackErr *StackError) IsNil() bool

func (*StackError) ShortTerm

func (stackErr *StackError) ShortTerm() string

Jump to

Keyboard shortcuts

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