Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStackTrace ¶
func GetStackTrace() []string
GetStackTrace retrieves the full stack (minus any runtime related functions) from where the Error was instantiated
Types ¶
type ErrInvalidArgument ¶ added in v2.24.2
type ErrInvalidArgument string
ErrInvalidArgument value for the expected functionality.
func (ErrInvalidArgument) Error ¶ added in v2.24.2
func (e ErrInvalidArgument) Error() string
func (ErrInvalidArgument) GetCode ¶ added in v2.24.2
func (e ErrInvalidArgument) GetCode() codes.Code
type ErrNotFound ¶ added in v2.24.2
type ErrNotFound string
ErrNotFound is returned when a resource does not exist for a given identifier.
func (ErrNotFound) Error ¶ added in v2.24.2
func (e ErrNotFound) Error() string
func (ErrNotFound) GetCode ¶ added in v2.24.2
func (e ErrNotFound) GetCode() codes.Code
type ErrParameterRequired ¶ added in v2.23.1
type ErrParameterRequired string
ErrParameterRequired is returned when a required parameter is empty or nil but requires a value.
func (ErrParameterRequired) Error ¶ added in v2.23.1
func (e ErrParameterRequired) Error() string
func (ErrParameterRequired) GetCode ¶ added in v2.23.1
func (e ErrParameterRequired) GetCode() codes.Code
type ErrRequiresSuperUser ¶ added in v2.23.1
type ErrRequiresSuperUser string
ErrRequiresSuperUser is returned when a user attempts to perform an action that requires superuser privileges.
func (ErrRequiresSuperUser) Error ¶ added in v2.23.1
func (e ErrRequiresSuperUser) Error() string
func (ErrRequiresSuperUser) GetCode ¶ added in v2.23.1
func (e ErrRequiresSuperUser) GetCode() codes.Code
type ErrTesting ¶ added in v2.23.1
type ErrTesting string
ErrTesting is for use in error test cases only. Should primarily be used for returning generic errors from mocks and ensuring the error is expected
func (ErrTesting) Error ¶ added in v2.23.1
func (e ErrTesting) Error() string
func (ErrTesting) GetCode ¶ added in v2.23.1
func (e ErrTesting) GetCode() codes.Code
type HasCode ¶ added in v2.23.1
HasCode exposes functionality for switching from an error to a status error
type TaggedError ¶ added in v2.24.1
type TaggedError interface { error // GetGRPCStatus returns the status.Status for this error GRPCStatus() *status.Status }
TaggedError is an error that has been tagged with a status.Status
func TagAndCode ¶ added in v2.23.1
func TagAndCode(tag string, code codes.Code, base error) TaggedError
TagAndCode the passed error
type Tracer ¶
type Tracer interface { // Trace returns the long format stack trace from where the error was instantiated Trace() []string }
Tracer provides a stack trace
type TracerError ¶
TracerError is an amalgamation of the Tracer and error interfaces
func New ¶
func New(message string) TracerError
New instantiates a TracerError with a message and a stack trace
func Newf ¶ added in v2.24.0
func Newf(format string, args ...interface{}) TracerError
Newf instantiates a TracerError with a formatted message and a stack trace