errors: github.com/cockroachdb/errors Index | Files | Directories

package errors

import "github.com/cockroachdb/errors"

Index

Package Files

assert_api.go barriers_api.go contexttags_api.go domains_api.go errbase_api.go errutil_api.go hintdetail_api.go issuelink_api.go markers_api.go report_api.go safedetails_api.go secondary_api.go telemetrykeys_api.go withstack_api.go

Constants

const UnimplementedErrorHint = issuelink.UnimplementedErrorHint

UnimplementedErrorHint forwards a definition.

func As Uses

func As(err error, target interface{}) bool

As forwards a definition

func AssertionFailedWithDepthf Uses

func AssertionFailedWithDepthf(depth int, format string, args ...interface{}) error

AssertionFailedWithDepthf forwards a definition.

func AssertionFailedf Uses

func AssertionFailedf(format string, args ...interface{}) error

AssertionFailedf forwards a definition.

func BuildSentryReport Uses

func BuildSentryReport(err error) (*sentry.Event, map[string]interface{})

BuildSentryReport forwards a definition.

func Cause Uses

func Cause(err error) error

Cause is provided for compatibility with github.com/pkg/errors.

func CombineErrors Uses

func CombineErrors(err, otherErr error) error

CombineErrors forwards a definition.

func DecodeError Uses

func DecodeError(ctx context.Context, enc EncodedError) error

DecodeError forwards a definition.

func EnsureNotInDomain Uses

func EnsureNotInDomain(err error, constructor DomainOverrideFn, forbiddenDomains ...Domain) error

EnsureNotInDomain forwards a definition.

func Errorf Uses

func Errorf(format string, args ...interface{}) error

Errorf forwards a definition.

func FlattenDetails Uses

func FlattenDetails(err error) string

FlattenDetails forwards a definition.

func FlattenHints Uses

func FlattenHints(err error) string

FlattenHints forwards a definition.

func FormatError Uses

func FormatError(err error, s fmt.State, verb rune)

FormatError can be used to implement the fmt.Formatter interface.

func GetAllDetails Uses

func GetAllDetails(err error) []string

GetAllDetails forwards a definition.

func GetAllHints Uses

func GetAllHints(err error) []string

GetAllHints forwards a definition.

func GetContextTags Uses

func GetContextTags(err error) []*logtags.Buffer

GetContextTags forwards a definition.

func GetOneLineSource Uses

func GetOneLineSource(err error) (file string, line int, fn string, ok bool)

GetOneLineSource forwards a definition.

func GetTelemetryKeys Uses

func GetTelemetryKeys(err error) []string

GetTelemetryKeys forwards a definition.

func HandleAsAssertionFailure Uses

func HandleAsAssertionFailure(origErr error) error

HandleAsAssertionFailure forwards a definition.

func HandleAsAssertionFailureDepth Uses

func HandleAsAssertionFailureDepth(depth int, origErr error) error

HandleAsAssertionFailureDepth forwards a definition.

func Handled Uses

func Handled(err error) error

Handled forwards a definition.

func HandledInDomain Uses

func HandledInDomain(err error, domain Domain) error

HandledInDomain forwards a definition.

func HandledInDomainWithMessage Uses

func HandledInDomainWithMessage(err error, domain Domain, msg string) error

HandledInDomainWithMessage forwards a definition.

func HandledWithMessage Uses

func HandledWithMessage(err error, msg string) error

HandledWithMessage forwards a definition.

func HasAssertionFailure Uses

func HasAssertionFailure(err error) bool

HasAssertionFailure forwards a definition.

func HasIssueLink(err error) bool

HasIssueLink forwards a definition.

func HasType Uses

func HasType(err, referenceType error) bool

HasType forwards a definition.

func HasUnimplementedError Uses

func HasUnimplementedError(err error) bool

HasUnimplementedError forwards a definition.

func If Uses

func If(err error, pred func(err error) (interface{}, bool)) (interface{}, bool)

If forwards a definition.

func Is Uses

func Is(err, reference error) bool

Is forwards a definition.

func IsAny Uses

func IsAny(err error, references ...error) bool

IsAny forwards a definition.

func IsAssertionFailure Uses

func IsAssertionFailure(err error) bool

IsAssertionFailure forwards a definition.

func IsInterface Uses

func IsInterface(err error, referenceInterface interface{}) bool

IsInterface forwards a definition.

func IsIssueLink(err error) bool

IsIssueLink forwards a definition.

func IsType Uses

func IsType(err, referenceType error) bool

IsType forwards a definition.

func IsUnimplementedError Uses

func IsUnimplementedError(err error) bool

IsUnimplementedError forwards a definition.

func Mark Uses

func Mark(err error, reference error) error

Mark forwards a definition.

func New Uses

func New(msg string) error

New forwards a definition.

func NewAssertionErrorWithWrappedErrf Uses

func NewAssertionErrorWithWrappedErrf(origErr error, format string, args ...interface{}) error

NewAssertionErrorWithWrappedErrf forwards a definition.

func NewWithDepth Uses

func NewWithDepth(depth int, msg string) error

NewWithDepth forwards a definition.

func NewWithDepthf Uses

func NewWithDepthf(depth int, format string, args ...interface{}) error

NewWithDepthf forwards a definition.

func Newf Uses

func Newf(format string, args ...interface{}) error

Newf forwards a definition.

func NotInDomain Uses

func NotInDomain(err error, doms ...Domain) bool

NotInDomain forwards a definition.

func Opaque Uses

func Opaque(err error) error

Opaque is provided for compatibility with xerrors.

func Redact Uses

func Redact(r interface{}) string

Redact returns a redacted version of the supplied item that is safe to use in anonymized reporting.

func RegisterLeafDecoder Uses

func RegisterLeafDecoder(typeName TypeKey, decoder LeafDecoder)

RegisterLeafDecoder forwards a definition.

func RegisterLeafEncoder Uses

func RegisterLeafEncoder(typeName TypeKey, encoder LeafEncoder)

RegisterLeafEncoder forwards a definition.

func RegisterWrapperDecoder Uses

func RegisterWrapperDecoder(typeName TypeKey, decoder WrapperDecoder)

RegisterWrapperDecoder forwards a definition.

func RegisterWrapperEncoder Uses

func RegisterWrapperEncoder(typeName TypeKey, encoder WrapperEncoder)

RegisterWrapperEncoder forwards a definition.

func ReportError Uses

func ReportError(err error) string

ReportError forwards a definition.

func SetWarningFn Uses

func SetWarningFn(fn func(context.Context, string, ...interface{}))

SetWarningFn forwards a definition.

func UnimplementedError Uses

func UnimplementedError(issueLink IssueLink, msg string) error

UnimplementedError forwards a definition.

func UnimplementedErrorf Uses

func UnimplementedErrorf(issueLink IssueLink, format string, args ...interface{}) error

UnimplementedErrorf forwards a definition.

func Unwrap Uses

func Unwrap(err error) error

Unwrap is provided for compatibility with xerrors.

func UnwrapAll Uses

func UnwrapAll(err error) error

UnwrapAll forwards a definition.

func UnwrapOnce Uses

func UnwrapOnce(err error) error

UnwrapOnce forwards a definition.

func WithAssertionFailure Uses

func WithAssertionFailure(err error) error

WithAssertionFailure forwards a definition.

func WithContextTags Uses

func WithContextTags(err error, ctx context.Context) error

WithContextTags forwards a definition.

func WithDetail Uses

func WithDetail(err error, msg string) error

WithDetail forwards a definition.

func WithDetailf Uses

func WithDetailf(err error, format string, args ...interface{}) error

WithDetailf forwards a definition.

func WithDomain Uses

func WithDomain(err error, domain Domain) error

WithDomain forwards a definition.

func WithHint Uses

func WithHint(err error, msg string) error

WithHint forwards a definition.

func WithHintf Uses

func WithHintf(err error, format string, args ...interface{}) error

WithHintf forwards a definition.

func WithIssueLink(err error, issue IssueLink) error

WithIssueLink forwards a definition.

func WithMessage Uses

func WithMessage(err error, msg string) error

WithMessage forwards a definition.

func WithMessagef Uses

func WithMessagef(err error, format string, args ...interface{}) error

WithMessagef forwards a definition.

func WithSafeDetails Uses

func WithSafeDetails(err error, format string, args ...interface{}) error

WithSafeDetails forwards a definition.

func WithSecondaryError Uses

func WithSecondaryError(err error, additionalErr error) error

WithSecondaryError forwards a definition.

func WithStack Uses

func WithStack(err error) error

WithStack forwards a definition.

func WithStackDepth Uses

func WithStackDepth(err error, depth int) error

WithStackDepth forwards a definition.

func WithTelemetry Uses

func WithTelemetry(err error, keys ...string) error

WithTelemetry forwards a definition.

func Wrap Uses

func Wrap(err error, msg string) error

Wrap forwards a definition.

func WrapWithDepth Uses

func WrapWithDepth(depth int, err error, msg string) error

WrapWithDepth forwards a definition.

func WrapWithDepthf Uses

func WrapWithDepthf(depth int, err error, format string, args ...interface{}) error

WrapWithDepthf forwards a definition.

func Wrapf Uses

func Wrapf(err error, format string, args ...interface{}) error

Wrapf forwards a definition.

type Domain Uses

type Domain = domains.Domain

Domain forwards a definition.

const NoDomain Domain = domains.NoDomain

NoDomain forwards a definition.

func GetDomain Uses

func GetDomain(err error) Domain

GetDomain forwards a definition.

func NamedDomain Uses

func NamedDomain(domainName string) Domain

NamedDomain forwards a definition.

func PackageDomain Uses

func PackageDomain() Domain

PackageDomain forwards a definition.

func PackageDomainAtDepth Uses

func PackageDomainAtDepth(depth int) Domain

PackageDomainAtDepth forwards a definition.

type DomainOverrideFn Uses

type DomainOverrideFn = func(originalDomain Domain, err error) error

DomainOverrideFn forwards a definition.

type EncodedError Uses

type EncodedError = errbase.EncodedError

EncodedError forwards a definition.

func EncodeError Uses

func EncodeError(ctx context.Context, err error) EncodedError

EncodeError forwards a definition.

type ErrorDetailer Uses

type ErrorDetailer = hintdetail.ErrorDetailer

ErrorDetailer forwards a definition.

type ErrorHinter Uses

type ErrorHinter = hintdetail.ErrorHinter

ErrorHinter forwards a definition.

type Formatter Uses

type Formatter = errbase.Formatter

Formatter is provided for compatibility with xerrors.

type IssueLink = issuelink.IssueLink

IssueLink forwards a definition.

func GetAllIssueLinks(err error) (issues []IssueLink)

GetAllIssueLinks forwards a definition.

type LeafDecoder Uses

type LeafDecoder = errbase.LeafDecoder

LeafDecoder forwards a definition.

type LeafEncoder Uses

type LeafEncoder = errbase.LeafEncoder

LeafEncoder forwards a definition.

type Printer Uses

type Printer = errbase.Printer

Printer is provided for compatibility with xerrors.

type ReportableStackTrace Uses

type ReportableStackTrace = withstack.ReportableStackTrace

ReportableStackTrace forwards a definition.

func GetReportableStackTrace Uses

func GetReportableStackTrace(err error) *ReportableStackTrace

GetReportableStackTrace forwards a definition.

type SafeDetailPayload Uses

type SafeDetailPayload = errbase.SafeDetailPayload

SafeDetailPayload forwards a definition.

func GetAllSafeDetails Uses

func GetAllSafeDetails(err error) []SafeDetailPayload

GetAllSafeDetails forwards a definition.

func GetSafeDetails Uses

func GetSafeDetails(err error) (payload SafeDetailPayload)

GetSafeDetails forwards a definition.

type SafeDetailer Uses

type SafeDetailer = errbase.SafeDetailer

SafeDetailer forwards a definition.

type SafeMessager Uses

type SafeMessager = safedetails.SafeMessager

SafeMessager forwards a definition.

func Safe Uses

func Safe(v interface{}) SafeMessager

Safe forwards a definition.

type TypeKey Uses

type TypeKey = errbase.TypeKey

TypeKey forwards a definition.

func GetTypeKey Uses

func GetTypeKey(err error) TypeKey

GetTypeKey forwards a definition.

type Wrapper Uses

type Wrapper interface {
    Unwrap() error
}

Wrapper is provided for compatibility with xerrors.

type WrapperDecoder Uses

type WrapperDecoder = errbase.WrapperDecoder

WrapperDecoder forwards a definition.

type WrapperEncoder Uses

type WrapperEncoder = errbase.WrapperEncoder

WrapperEncoder forwards a definition.

Directories

PathSynopsis
assert
barriers
contexttags
domains
domains/internal
errbase
errbase/internal
errorspb
errutilPackage errutil combines primitives from the library, the Go errors package and github.com/pkg/errors.
extgrpc
exthttp
grpc
grpc/middleware
grpc/status
hintdetail
issuelink
markers
markers/internal
report
safedetails
secondary
stdstrings
telemetrykeys
testutils
withstack
withstack/internal

Package errors imports 18 packages (graph) and is imported by 344 packages. Updated 2020-03-12. Refresh now. Tools for package owners.