dasherr

package
Version: v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanRetry

func CanRetry(err error) bool

func ErrWithCode

func ErrWithCode(code ErrCode, err error) error

func ErrWithCodeStr

func ErrWithCodeStr(code ErrCode, errStr string) error

func FromRtnStatus

func FromRtnStatus(apiName string, rtnStatus *dashproto.RtnStatus) error

func JsonMarshalErr

func JsonMarshalErr(thing string, err error) error

func JsonUnmarshalErr

func JsonUnmarshalErr(thing string, err error) error

func LimitErr

func LimitErr(message string, limitName string, limitMax float64) error

func MakeDashErr

func MakeDashErr(code ErrCode, isPermanent bool, err error) error

func NoRetryErr

func NoRetryErr(err error) error

func NoRetryErrWithCode

func NoRetryErrWithCode(code ErrCode, err error) error

func RpcErr

func RpcErr(apiName string, respErr error) error

func ValidateErr

func ValidateErr(err error) error

Types

type DashErr

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

func AsDashErr

func AsDashErr(err error) *DashErr

func (*DashErr) CanRetry

func (e *DashErr) CanRetry() bool

func (*DashErr) ErrCode

func (e *DashErr) ErrCode() ErrCode

func (*DashErr) Error

func (e *DashErr) Error() string

func (*DashErr) Unwrap

func (e *DashErr) Unwrap() error

type ErrCode

type ErrCode string
const (
	ErrCodeNone         ErrCode = ""
	ErrCodeEof          ErrCode = "EOF"
	ErrCodeUnknown      ErrCode = "UNKNOWN"
	ErrCodeBadConnId    ErrCode = "BADCONNID"
	ErrCodeAccAccess    ErrCode = "ACCACCESS"
	ErrCodeNoHandler    ErrCode = "NOHANDLER"
	ErrCodeBadAuth      ErrCode = "BADAUTH"
	ErrCodeNoAcc        ErrCode = "NOACC"
	ErrCodeNoApp        ErrCode = "NOAPP"
	ErrCodePanic        ErrCode = "PANIC"
	ErrCodeJson         ErrCode = "JSON"
	ErrCodeRpc          ErrCode = "RPC"
	ErrCodeLimit        ErrCode = "LIMIT"
	ErrCodeNotConnected ErrCode = "NOCONN"
	ErrCodeValidation   ErrCode = "NOTVALID"
	ErrCodeQueueFull    ErrCode = "QUEUE"
	ErrCodeTimeout      ErrCode = "TIMEOUT"
	ErrCodeNotImpl      ErrCode = "NOTIMPL"
)

func GetErrCode

func GetErrCode(err error) ErrCode

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL