errors

package
v1.5.10 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: LGPL-3.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyAddresses = errors.New("address list is empty")
View Source
var ErrTimeout error = errors.New("timeout")

Functions

func IsBusinessError

func IsBusinessError(err error) bool

Types

type AccountNotFoundError

type AccountNotFoundError struct {
	Account types.Address
}

AccountNotFoundError represents error of account not found.

func NewAccountNotFoundError

func NewAccountNotFoundError(address types.Address) *AccountNotFoundError

NewAccountNotFoundError creates a new AccountNotFoundError instance

func (*AccountNotFoundError) Error

func (e *AccountNotFoundError) Error() string

Error implements error interface

type BusinessError

type BusinessError struct {
	Code  ErrorCode
	Inner error
}

func (BusinessError) Error

func (e BusinessError) Error() string

type ErrorCode

type ErrorCode int
const (
	CodePivotAssumption ErrorCode = 1
	CodeBlockNotFound
)

func DetectErrorCode

func DetectErrorCode(err error) (ok bool, code ErrorCode)

DetectErrorCode detect error code according to string of err.Error(), ok indicate accroding errorcode is found

func (ErrorCode) String

func (e ErrorCode) String() string

Jump to

Keyboard shortcuts

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