# 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
- Create new nerror
newBadErr = nerror.New("failed connection: %s", "10.9.1.0")
- Create new nerror with stacktrace
newBadErr = nerror.Stacked("failed connection: %s", "10.9.1.0")
- Wrap existing error
newBadErr = nerror.Wrap(BadErr, "something bad happened here")
- Wrap existing error with stacktrace
newBadErr = nerror.WrapStack(BadErr, "something bad happened here")
- Add Stack to package's error type without stack trace.
newBadErr = nerror.StackIt(BadErr)