func (e *Error) WithLog(logger *zap.Logger, args ...zapcore.Field) *Error {
	if logger != nil {
		logger.Error(e.String(), args...)
	}
	return e
}
WithLog logs the error with some extra fields, which are part of the log but
not of the returned error.
package errors
import (
	stderr "errors"
	"fmt"
	"go.uber.org/zap"
	"go.uber.org/zap/zapcore"
)
var _ error = New("")
func New(msg string) *Error {
	return &Error{msg: msg}
}
type Error struct {
	msg string
	err error
}
func (e *Error) Error() string {
	return e.String()
}
func (e *Error) Unwrap() error {
	if e == nil {
		return nil
	}
	return e.err
}
func (e *Error) Wrap(err error) *Error {
	if err == nil {
		return e
	}
	if e == nil {
		return &Error{msg: err.Error()}
	}
	return &Error{
		msg: e.msg,
		err: err,
	}
}
func (e *Error) WrapMessage(msg string, args ...interface{}) *Error {
	wrapped := fmt.Errorf(msg, args...)
	return e.Wrap(wrapped)
}