cockroach: github.com/cockroachdb/cockroach/pkg/util/errorutil Index | Files | Directories

package errorutil

import "github.com/cockroachdb/cockroach/pkg/util/errorutil"

Index

Package Files

catch.go error.go

func SendReport Uses

func SendReport(ctx context.Context, sv *settings.Values, err error)

SendReport creates a Sentry report about the error, if the settings allow. The format string will be reproduced ad litteram in the report; the arguments will be sanitized.

func ShouldCatch Uses

func ShouldCatch(obj interface{}) (ok bool, err error)

ShouldCatch is used for catching errors thrown as panics. Its argument is the object returned by recover(); it succeeds if the object is an error. If the error is a runtime.Error, it is converted to an internal error (see errors.AssertionFailedf).

func UnexpectedWithIssueErrorf Uses

func UnexpectedWithIssueErrorf(issue int, format string, args ...interface{}) error

UnexpectedWithIssueErrorf indicates an error with an associated Github issue. It's supposed to be used for conditions that would otherwise be checked by assertions, except that they fail and we need the public's help for tracking it down. The error message will invite users to report repros.

Directories

PathSynopsis
unimplemented

Package errorutil imports 6 packages (graph) and is imported by 10 packages. Updated 2019-07-28. Refresh now. Tools for package owners.