errorx

package
v2.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func IsEOF

func IsEOF(err error) bool

func IsIOError

func IsIOError(err error) bool

func IsRecoverAbleError

func IsRecoverAbleError(err error) bool

func IsUnexpectedErr

func IsUnexpectedErr(err error) bool

func NewEOF

func NewEOF() error

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
	EOF           ErrorCode = 1005

	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