package
0.8.9
Repository: https://github.com/influx6/npkg.git
Documentation: pkg.go.dev

# README

Errors

Errors provides a package for wrapping go based nerror with location of return site.

Install

go get -v github.com/influx6/npkg/nerror

Usage

  1. Create new nerror
newBadErr = nerror.New("failed connection: %s", "10.9.1.0")
  1. Create new nerror with stacktrace
newBadErr = nerror.Stacked("failed connection: %s", "10.9.1.0")
  1. Wrap existing error
newBadErr = nerror.Wrap(BadErr, "something bad happened here")
  1. Wrap existing error with stacktrace
newBadErr = nerror.WrapStack(BadErr, "something bad happened here")
  1. Add Stack to package's error type without stack trace.
newBadErr = nerror.StackIt(BadErr)