Documentation ¶
Index ¶
- Constants
- func AddError(errs []error, err error, strs ...string) ([]error, bool)
- func AddErrors(errs []error, newErrs []error, strs ...string) ([]error, bool)
- func Append(err error, str string) error
- func AreAllErrors(errs []error) bool
- func CastRecoverError(errInterface interface{}, strs ...string) error
- func Cause(err error) error
- func CauseOrSelf(err error) error
- func ErrorStr(err error, strs ...string) string
- func ErrorUnexpected(msgs ...interface{}) error
- func FirstError(errs ...error) error
- func FirstErrorInMap(errs map[string]error) error
- func FirstKeyInErrorMap(errs map[string]error) string
- func GetKind(err error) string
- func GetMetadata(err error) interface{}
- func HasError(errs []error) bool
- func IsNoPrint(err error) bool
- func IsNoTelemetry(err error) bool
- func ListOfErrors(errKind string, shouldPrint bool, errors ...error) error
- func MapHasError(errs map[string]error) bool
- func Message(err error, strs ...string) string
- func MessageFirstLine(err error, strs ...string) string
- func NonNilErrorMapKeys(errs map[string]error) []string
- func PrintError(err error, strs ...string)
- func PrintErrorForUser(err error, strs ...string)
- func PrintStacktrace(err error)
- func SetNoPrint(err error) error
- func SetNoTelemetry(err error) error
- func WithStack(err error) error
- func Wrap(err error, strs ...string) error
- func WrapAll(errs []error, strs ...string) []error
- func Wrapf(err error, template string, params ...string) error
- type Error
Constants ¶
View Source
const ErrNotCortexError = "error"
View Source
const (
ErrUnexpected = "errors.unexpected"
)
Variables ¶
This section is empty.
Functions ¶
func Append ¶ added in v0.16.0
adds to the end of the error message (without adding any whitespace or punctuation)
func AreAllErrors ¶ added in v0.17.0
func CastRecoverError ¶
func CauseOrSelf ¶ added in v0.15.0
func ErrorUnexpected ¶ added in v0.18.0
func ErrorUnexpected(msgs ...interface{}) error
func FirstError ¶
func FirstErrorInMap ¶ added in v0.17.0
func FirstKeyInErrorMap ¶ added in v0.17.0
func GetMetadata ¶ added in v0.20.0
func GetMetadata(err error) interface{}
func IsNoTelemetry ¶ added in v0.15.0
func ListOfErrors ¶ added in v0.35.0
func MapHasError ¶ added in v0.17.0
func MessageFirstLine ¶ added in v0.14.0
func NonNilErrorMapKeys ¶ added in v0.17.0
func PrintError ¶
func PrintErrorForUser ¶ added in v0.15.0
func PrintStacktrace ¶
func PrintStacktrace(err error)
func SetNoPrint ¶ added in v0.15.0
func SetNoTelemetry ¶ added in v0.15.0
Types ¶
type Error ¶ added in v0.15.0
type Error struct { Kind string Message string Metadata interface{} // won't be printed NoTelemetry bool NoPrint bool Cause error // contains filtered or unexported fields }
func (*Error) StackTrace ¶ added in v0.15.0
func (cortexError *Error) StackTrace() pkgerrors.StackTrace
Click to show internal directories.
Click to hide internal directories.