Skip to content

Latest commit

 

History

History

errpot

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

errpot

Description:

Very convenient if used together with a logpot:

log := logpot.WithFields(...)
...
errpot.Wrap(err, "error msg").WithFieldsFrom(log) // <-- no need add context data, use log's context 

Notes:

  1. When err == nil, errpot.Wrap(err, "...") will return nil, so WithField/s(...) can't be used

  2. const errors should be created with NewConstError(...)