package
1.11.3
Repository: https://github.com/cockroachdb/errors.git
Documentation: pkg.go.dev

# Functions

DecodeError decodes an error.
ElideSharedStackTraceSuffix removes the suffix of newStack that's already present in prevStack.
EncodeError encodes an error.
FormatError formats an error according to s and verb.
FormatRedactableError formats an error as a safe object.
Formattable wraps an error into a fmt.Formatter which will provide "smart" formatting even if the outer layer of the error does not implement the Formatter interface.
GetAllSafeDetails collects the safe details from the given error object and all its causes.
GetSafeDetails collects the safe details from the given error object.
GetTypeKey retrieve the type key for a given error object.
GetTypeMark retrieves the ErrorTypeMark for a given error object.
RegisterLeafDecoder can be used to register new leaf error types to the library.
RegisterLeafEncoder can be used to register new leaf error types to the library.
RegisterMultiCauseDecoder can be used to register new multi-cause wrapper types to the library.
RegisterMultiCauseEncoder can be used to register new multi-cause error types to the library.
RegisterSpecialCasePrinter registers a handler.
RegisterTypeMigration tells the library that the type of the error given as 3rd argument was previously known with type previousTypeName, located at previousPkgPath.
RegisterWrapperDecoder can be used to register new wrapper types to the library.
RegisterWrapperEncoder can be used to register new wrapper types to the library.
RegisterWrapperEncoderWithMessageType can be used to register new wrapper types to the library.
SetWarningFn enables configuration of the warning function.
TestingWithEmptyMigrationRegistry is intended for use by tests.
UnwrapAll accesses the root cause object of the error.
UnwrapMulti access the slice of causes that an error contains, if it is a multi-error.
UnwrapOnce accesses the direct cause of the error if any, otherwise returns nil.

# Constants

FullMessage denotes an error message that contains the text of its causes and can be displayed standalone.
Prefix denotes an error message that should be prepended to the message of its cause.

# Structs

OpaqueErrno represents a syscall.Errno error object that was constructed on a different OS/platform combination.
SafeDetailPayload captures the safe strings for one level of wrapping.

# Interfaces

A Formatter formats error messages.
A Printer formats error messages.
SafeDetailer is an interface that can be implemented by errors that can provide PII-free additional strings suitable for reporting or telemetry.
SafeFormatter is implemented by error leaf or wrapper types that want to separate safe and non-safe information when printed out.
StackTraceProvider is a provider of StackTraces.
TypeKeyMarker can be implemented by errors that wish to extend their type name as seen by GetTypeKey().

# Type aliases

EncodedError is the type of an encoded (and protobuf-encodable) error.
LeafDecoder is to be provided (via RegisterLeafDecoder above) by additional wrapper types not yet known to this library.
LeafEncoder is to be provided (via RegisterLeafEncoder above) by additional wrapper types not yet known to this library.
MessageType is used to encode information about an error message within a wrapper error type.
MultiCauseDecoder is to be provided (via RegisterMultiCauseDecoder above) by additional multi-cause wrapper types not yet known by the library.
MultiCauseEncoder is to be provided (via RegisterMultiCauseEncoder above) by additional multi-cause wrapper types not yet known to this library.
StackFrame is the type of a single call frame entry.
StackTrace is the type of the data for a call stack.
TypeKey identifies an error for the purpose of looking up decoders.
WrapperDecoder is to be provided (via RegisterWrapperDecoder above) by additional wrapper types not yet known to this library.
WrapperEncoder is to be provided (via RegisterWrapperEncoder above) by additional wrapper types not yet known to this library.
WrapperEncoderWithMessageType is to be provided (via RegisterWrapperEncoderWithMessageType above) by additional wrapper types not yet known to this library.