errorx

package
v1.14.6 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotFoundErr = NewWithCode(NOT_FOUND, "not found")

Functions

func IsIOError

func IsIOError(err error) bool

func IsRestRecoverAbleError

func IsRestRecoverAbleError(err error) bool

func NewIOErr

func NewIOErr(msg string) error

func NewParserError

func NewParserError(msg string) error

Types

type Error

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

func New

func New(message string) *Error

func NewWithCode

func NewWithCode(code ErrorCode, message string) *Error

func (*Error) Code

func (e *Error) Code() ErrorCode

func (*Error) Error

func (e *Error) Error() string

type ErrorCode

type ErrorCode int
const (
	Undefined_Err ErrorCode = 1000
	GENERAL_ERR   ErrorCode = 1001
	NOT_FOUND     ErrorCode = 1002
	IOErr         ErrorCode = 1003
	CovnerterErr  ErrorCode = 1004

	ParserError   ErrorCode = 2001
	PlanError     ErrorCode = 2101
	ExecutorError ErrorCode = 2201

	StreamTableError ErrorCode = 3000
	RuleErr          ErrorCode = 4000
	ConfKeyError     ErrorCode = 5000
)

func GetErrorCode

func GetErrorCode(err error) (ErrorCode, bool)

type ErrorWithCode

type ErrorWithCode interface {
	Error() string
	Code() ErrorCode
}

type MockTemporaryError

type MockTemporaryError struct{}

func (*MockTemporaryError) Error

func (e *MockTemporaryError) Error() string

func (*MockTemporaryError) Temporary

func (e *MockTemporaryError) Temporary() bool

Jump to

Keyboard shortcuts

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