errors

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 3 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStack added in v1.0.9

func GetStack(_skip ...int) []string

func IsError

func IsError(err error) bool

IsError error is Rainbow Error or not

func New

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

New error with call stack

func NewErr

func NewErr(err error, skip ...int) error

NewErr new error with error stack from error

func ShowStack

func ShowStack(err error) string

ShowStack show error with call stack

func Wrapper

func Wrapper(err *error)

Wrapper wrap error with stack.

func foo() (err error) {
    defer errors.Wrapper(&err)
    ... some code
}

Types

type Error

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

Error struct

func (*Error) Error

func (err *Error) Error() string

Error return the error message

func (*Error) ErrorWithStack

func (err *Error) ErrorWithStack() string

Error return the error message

Jump to

Keyboard shortcuts

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