Documentation ¶
Index ¶
- func ErrIndexOutOfRange(idx, len int) error
- func ErrorsToStrings(errs []error) (int, []string)
- func Join(inclNils bool, errs ...error) error
- func NewErrorWithLocation(msg string) error
- func NilifyIs(err error, errs ...error) error
- func PanicOnErr(err error)
- func Wrap(err error, wrap ...string) error
- func Wrapf(origErr error, wrapFormat string, wrapVars ...any) error
- type ErrorInfo
- type ErrorInfos
- type ErrorWithLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrIndexOutOfRange ¶ added in v0.40.4
ErrIndexOutOfRange returns an `error` using the standard message for index out of range.
func ErrorsToStrings ¶
ErrorsToStrings returns a slice of strings. A count of non-nil errors is also returned.
func NewErrorWithLocation ¶ added in v0.66.6
func NilifyIs ¶ added in v0.51.0
NilifyIs will return a `nil` for if the supplied `err` `errors.Is() any of the errors in `errs`.`
func PanicOnErr ¶
func PanicOnErr(err error)
PanicOnErr is a syntactic sugar function to panic on error.
Types ¶
type ErrorInfos ¶
type ErrorInfos []*ErrorInfo
func (ErrorInfos) ErrorsString ¶
func (eis ErrorInfos) ErrorsString() []string
func (ErrorInfos) Filter ¶
func (eis ErrorInfos) Filter(isError bool) ErrorInfos
func (ErrorInfos) GoodCorrects ¶
func (eis ErrorInfos) GoodCorrects() []string
func (ErrorInfos) GoodInputs ¶
func (eis ErrorInfos) GoodInputs() []string
func (ErrorInfos) Inflate ¶
func (eis ErrorInfos) Inflate()
type ErrorWithLocation ¶ added in v0.66.6
ErrorWithLocation represents an error message with code file and line locaiton. It is automatically populated when instantiated with `NewErrorWithLocation()`, and follows the `errors.Error` interface.
func (*ErrorWithLocation) Error ¶ added in v0.66.6
func (e *ErrorWithLocation) Error() string
Click to show internal directories.
Click to hide internal directories.