Help us shape the future of Go! Take the 2026 Go Developer Survey

errors

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2017 License: GPL-3.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNil                   = New(95200, "everything is fine")
	ErrNotExist              = New(95201, "object not exist")
	ErrTimeOut               = New(95202, "time out")
	ErrUnknown               = New(95203, "unknown error")
	ErrUnknownType           = New(95204, "unknown object type")
	ErrCannotSetNilValue     = New(95205, "condition not match")
	ErrEntryTooLarge         = New(95206, "entry is too large")
	ErrTxnTooLarge           = New(95207, "transaction is too large")
	ErrCanNotFoundNode       = New(95208, "could not found any node can use")
	ErrSameJob               = New(95209, "this job set himself as his parent")
	ErrNoCmd                 = New(95210, "a job must have a Command")
	ErrNoReg                 = New(95211, "must specify a region")
	ErrNoExp                 = New(95212, "a job must have a Expression")
	ErrScheduleParse         = New(95213, "can't parse job schedule")
	ErrType                  = New(95214, "type error")
	ErrArgs                  = New(95215, "must have name and region")
	ErrLockTimeout           = New(95216, "locking timeout")
	ErrStartSerf             = New(95217, "start serf failed")
	ErrMissKeyFile           = New(95218, "have no key file or cert file path")
	ErrMissCaFile            = New(95219, "have no ca file path")
	ErrUnknownOps            = New(95220, "unknown ops")
	ErrRepetition            = New(95221, "already have same object")
	ErrLinkNum               = New(95222, "count of links must equal to conditions plus one")
	ErrConditionFormat       = New(95223, "error format of conditions")
	ErrNotSupportSymbol      = New(95224, "logic symbol not support")
	ErrMissApiToken          = New(95225, "must have Api tokens")
	ErrRepetionToken         = New(95226, "api token must be unique")
	ErrNotExpectation        = New(95227, "type does not match expectations")
	ErrIllegalCharacter      = New(95228, "'###' is not allow used in key")
	ErrParentNotInSameRegion = New(95229, "parent job must be in same region")
	ErrParentNotExist        = New(95230, "parent job not exist")
	ErrHaveSubJob            = New(95231, "please delete sub-job first")
	ErrCopyToUnaddressable   = New(95232, "copy to value is unaddressable")
	ErrNodeDead              = New(95233, "found node is not alive")
	ErrNodeNoRPC             = New(95234, "found node have no completed rpc config")
	ErrBlankTimeFormat       = New(95235, "Blank time format")
)

djob errors list

Functions

func GenGRPCErr

func GenGRPCErr(err error) error

GenGRPCErr used to generate grpc error from any kind error

Types

type Error

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

Error custom error type

func New

func New(code int, text string) *Error

New a new error

func NewFromGRPCErr

func NewFromGRPCErr(err error) (*Error, bool)

NewFromGRPCErr func transform grcp error to this Error

func (*Error) Equal

func (e *Error) Equal(err error) bool

Equal return true when errors code equal

func (*Error) Error

func (e *Error) Error() string

Error func implement the standard error interface

func (*Error) GenGRPCErr

func (e *Error) GenGRPCErr() error

GenGRPCErr used to generate grpc error

func (*Error) Less

func (e *Error) Less(err error) bool

Less error code less

func (*Error) NotEqual

func (e *Error) NotEqual(err error) bool

NotEqual return true when errors code not equal

Jump to

Keyboard shortcuts

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