rzerrors

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2021 License: MIT Imports: 11 Imported by: 2

README

RZ-errors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cause

func Cause(err error) error

func ConvertGRPCStatusError

func ConvertGRPCStatusError(err error) error

func ConvertTwirpError added in v1.1.0

func ConvertTwirpError(err error) twirp.Error

func GetErrorMessages

func GetErrorMessages(e error) string

func GetErrorMessagesWithStack

func GetErrorMessagesWithStack(e error) string

Types

type ErrorFormatter

type ErrorFormatter interface {
	GetArgs() []interface{}
	GetMessage() string
	GetFormattedMessage() string
}

type ErrorID

type ErrorID interface {
	ID() string
}

type ErrorStacktrace

type ErrorStacktrace struct {
	// contains filtered or unexported fields
}

func NewErrorWithStackTrace

func NewErrorWithStackTrace(stackLen int, callerLen int) *ErrorStacktrace

func (*ErrorStacktrace) GetStack

func (e *ErrorStacktrace) GetStack() string

func (*ErrorStacktrace) GetStackAsJSON

func (e *ErrorStacktrace) GetStackAsJSON() interface{}

func (*ErrorStacktrace) StackAddrs

func (e *ErrorStacktrace) StackAddrs() string

func (*ErrorStacktrace) StackFrames

func (e *ErrorStacktrace) StackFrames() []StackFrame

type ErrorWithGRPCCode

type ErrorWithGRPCCode struct {
	// contains filtered or unexported fields
}

func NewErrorWithgRPCCode

func NewErrorWithgRPCCode(grpcCode codes.Code) *ErrorWithGRPCCode

func (*ErrorWithGRPCCode) GRPCCode

func (err *ErrorWithGRPCCode) GRPCCode() codes.Code

type ErrorWithHTTPStatus

type ErrorWithHTTPStatus struct {
	// contains filtered or unexported fields
}

func NewErrorWithHTTPStatus

func NewErrorWithHTTPStatus(httpStatus int) *ErrorWithHTTPStatus

func (*ErrorWithHTTPStatus) StatusCode

func (err *ErrorWithHTTPStatus) StatusCode() int

type ErrorWithID

type ErrorWithID struct {
	// contains filtered or unexported fields
}

func NewErrorWithID

func NewErrorWithID(id string) *ErrorWithID

func (*ErrorWithID) ID

func (err *ErrorWithID) ID() string

type ErrorWithTwirpCode added in v1.1.0

type ErrorWithTwirpCode struct {
	// contains filtered or unexported fields
}

func NewErrorWithTwirpCode added in v1.1.0

func NewErrorWithTwirpCode(errCode twirp.ErrorCode) *ErrorWithTwirpCode

func (*ErrorWithTwirpCode) ErrorCode added in v1.1.0

func (err *ErrorWithTwirpCode) ErrorCode() twirp.ErrorCode

type GRPCError

type GRPCError interface {
	GRPCCode() codes.Code
}

type HTTPError

type HTTPError interface {
	StatusCode() int
}

type RZError

type RZError struct {
	// contains filtered or unexported fields
}

func NewRZError

func NewRZError(messageFormat string, args ...interface{}) *RZError

func (*RZError) Cause

func (w *RZError) Cause() error

func (*RZError) Error

func (e *RZError) Error() string

func (*RZError) GetArgs

func (e *RZError) GetArgs() []interface{}

func (*RZError) GetFormattedMessage

func (e *RZError) GetFormattedMessage() string

func (*RZError) GetMessage

func (e *RZError) GetMessage() string

func (*RZError) Wrap

func (e *RZError) Wrap(err error)

type StackFrame

type StackFrame struct {
	PC         uintptr
	Func       *runtime.Func
	FuncName   string
	File       string
	LineNumber int
}

Represents a single stack frame.

type StackTracer

type StackTracer interface {
	Error() string
	StackAddrs() string
	StackFrames() []StackFrame
	GetStack() string
	GetStackAsJSON() interface{}
}

type TwirpError added in v1.1.0

type TwirpError interface {
	ErrorCode() twirp.ErrorCode
}

Directories

Path Synopsis
proto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL