dferrors

package
v2.1.60 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 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 added in v2.0.9

func ConvertDfErrorToGRPCError(err error) error

ConvertDfErrorToGRPCError converts DfError to grpc error, if it is.

func ConvertGRPCErrorToDfError added in v2.0.9

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 IsGRPCDfError added in v2.1.26

func IsGRPCDfError(err error) (*DfError, bool)

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