Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorStack ¶
ErrorStack is similar to errors.ErrorStack, but it also includes the stack of the internal error, if given err is an internal error wrapper.
func InternalCause ¶
InternalCause is like InternalErr, but it returns the original cause of the error.
func InternalErr ¶
InternalErr takes an error, and if it's an internal error wrapper, returns the underlying internal error (which might still be wrapped with errors.Trace() or some such). Otherwise, just returns the given err back.
err is an "internal error wrapper" if it's a value returned from WrapInternalError, which can be further wrapped into errors.Trace() or friends.
func IsInternalError ¶
IsInternalError reports whether the given err is an internal error wrapper.
func WrapInternalError ¶
WrapInternalError wraps two errors: internal intError and external pubError. All standard operations on the resulting error will behave as if pubError was the original cause, thus hiding the internal error, which is only retrievable with the accessor functions below.
func WrapInternalErrorf ¶
WrapInternalErrorf takes an internal error, creates a new (public) error with the formatted message, and calls WrapInternalError with those two errors.
Types ¶
This section is empty.