simplerr

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 4 Imported by: 3

README

simplerr

Documentation

Overview

Package simplerr implement error with code

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCode

func GetCode(err error) int64

func HasCode

func HasCode(err error, code int64) bool

func Is

func Is(err, target error) bool

func Wrap

func Wrap(err error, msg string) error

func WrapWithCode

func WrapWithCode(err error, code int64, msg string) error

func Wrapf

func Wrapf(err error, tmpl string, args ...interface{}) error

func WrapfWithCode

func WrapfWithCode(err error, code int64, tmpl string, args ...interface{}) error

Types

type Call

type Call struct {
	Line     int
	File     string
	FuncName string
}

func GetStack

func GetStack(err error) []Call

Jump to

Keyboard shortcuts

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