dferrors

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidArgument = errors.New("invalid argument")
	ErrInvalidHeader   = errors.New("invalid Header")
	ErrDataNotFound    = errors.New("data not found")
	ErrEmptyValue      = errors.New("empty value")
	ErrConvertFailed   = errors.New("convert failed")
	ErrEndOfStream     = errors.New("end of stream")
	ErrNoCandidateNode = errors.New("no candidate server node")
)

common and framework errors

Functions

func CheckError

func CheckError(err error, code commonv1.Code) bool

func ConvertDfErrorToGRPCError

func ConvertDfErrorToGRPCError(err error) error

ConvertDfErrorToGRPCError converts DfError to grpc error, if it is.

func ConvertGRPCErrorToDfError

func ConvertGRPCErrorToDfError(err error) error

ConvertGRPCErrorToDfError converts grpc error to DfError, if it exists.

func IsEndOfStream

func IsEndOfStream(err error) bool

Types

type DfError

type DfError struct {
	Code    commonv1.Code
	Message string
}

func New

func New(code commonv1.Code, msg string) *DfError

func Newf

func Newf(code commonv1.Code, format string, a ...any) *DfError

func (*DfError) Error

func (s *DfError) Error() string

Jump to

Keyboard shortcuts

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