package
0.0.11
Repository: https://github.com/grailbio/base.git
Documentation: pkg.go.dev

# Functions

CleanUp is defer-able syntactic sugar that calls f and reports an error, if any, to *err.
CleanUpCtx is CleanUp for a context-ful cleanUp.
E constructs a new errors from the provided arguments.
Is tells whether an error has a specified kind, except for the indeterminate kind Other.
IsTemporary tells whether the provided error is likely temporary.
Match tells whether every nonempty field in err1 matches the corresponding fields in err2.
New is synonymous with errors.New, and is provided here so that users need only import one errors package.
Recover recovers any error into an *Error.
Visit calls the given function for every error object in the chain, including itself.

# Constants

Canceled indicates a context cancellation.
Exists indicates that a resource already exists.
Fatal indicates that the underlying error condition is unrecoverable; retrying is unlikely to help.
Integrity indicates an integrity failure.
Invalid indicates that the caller supplied invalid parameters.
Net indicates a network error.
NotAllowed indicates a permission failure.
NotExist indicates a nonexistent resources.
NotSupported indicates an unsupported operation.
OOM indicates that an OOM condition was encountered.
Other indicates an unknown error.
Precondition indicates that a precondition was not met.
Remote indicates an error returned by an RPC, as distinct from errors in the machinery to execute the RPC, e.g.
ResourcesExhausted indicates that there were insufficient resources.
Retriable indicates that the failing operation can be safely retried, regardless of application context.
Temporary indicates that the underlying error condition is likely temporary, and can be possibly be retried.
Timeout indicates an operation time out.
TooManyTries indicates a retry budget was exhausted.
Unavailable indicates that a resource was unavailable.
Unknown indicates the error's severity is unknown.

# Variables

Separator defines the separation string inserted between chained errors in error messages.

# Structs

Error is the standard error type, carrying a kind (error code), message (error message), and potentially an underlying error.
Once captures at most one error.

# Type aliases

Kind defines the type of error.
Severity defines an Error's severity.