z1err

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(e error, opt ...interface{}) (noerr bool, wrapedErr error)

Check check and add addon msg to error or panic. eg1:Check(err) eg2:Check(err, true) eg3:Check(err, false) eg4:Check(err, true, "this is addon msg") eg5:Check(err, false, "this is addon msg")

func Handle

func Handle(returnErr *error, recoverFunc ...func(err error))

Handle catching error to return or assign to recoverFunc. eg1:defer z1err.Handle(&err) eg2:defer z1err.Handle(nil, func(err error) {...}

func StackPrint

func StackPrint(err error, skip ...int) (str string)

StackPrint print msg with stack and can set skip. eg:z1err.StackPrint(err) eg:z1err.StackPrint(err, 7)

Types

This section is empty.

Jump to

Keyboard shortcuts

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