errors

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: LGPL-3.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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