tezerrors

package
v0.1.53 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasError

func HasError(err []*Error, errorID string) bool

HasError -

func HasGasExhaustedError

func HasGasExhaustedError(err []*Error) bool

HasGasExhaustedError -

func HasParametersError

func HasParametersError(err []*Error) bool

HasParametersError -

func HasScriptRejectedError

func HasScriptRejectedError(err []*Error) bool

HasScriptRejectedError -

func LoadErrorDescriptions

func LoadErrorDescriptions() (err error)

LoadErrorDescriptions -

Types

type BalanceTooLowError

type BalanceTooLowError struct {
	DefaultError
	Balance int64 `json:"balance,string"`
	Amount  int64 `json:"amount,string"`
}

BalanceTooLowError -

func (*BalanceTooLowError) Format

func (e *BalanceTooLowError) Format() error

Format -

func (*BalanceTooLowError) String

func (e *BalanceTooLowError) String() string

String -

type DefaultError

type DefaultError struct {
	Location int64              `json:"location,omitempty"`
	With     stdJSON.RawMessage `json:"with,omitempty"`
}

DefaultError -

func (*DefaultError) Format

func (e *DefaultError) Format() error

Format -

func (*DefaultError) String

func (e *DefaultError) String() string

String -

type Description

type Description struct {
	Title       string `json:"title"`
	Description string `json:"descr"`
}

Description -

type Error

type Error struct {
	ID          string `json:"id"`
	Kind        string `json:"kind"`
	Title       string `json:"title,omitempty"`
	Description string `json:"descr,omitempty"`

	IError `json:"-"`
}

Error -

func First

func First(err []*Error, errorID string) *Error

First -

func ParseArray

func ParseArray(data []byte) ([]*Error, error)

ParseArray -

func (*Error) Format

func (e *Error) Format() error

Format -

func (*Error) GetTitle

func (e *Error) GetTitle() string

GetTitle -

func (*Error) Is

func (e *Error) Is(errorID string) bool

Is -

func (*Error) MarshalJSON

func (e *Error) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Error) String

func (e *Error) String() string

String -

func (*Error) UnmarshalJSON

func (e *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON -

type Errors

type Errors []*Error

Errors -

func (*Errors) Scan

func (e *Errors) Scan(value interface{}) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (Errors) Value

func (e Errors) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

type IError

type IError interface {
	fmt.Stringer

	Format() error
}

IError -

type InvalidSyntacticConstantError

type InvalidSyntacticConstantError struct {
	WrongExpressionSnake stdJSON.RawMessage `json:"wrong_expression"`
	ExpectedFormSnake    stdJSON.RawMessage `json:"expected_form"`

	WrongExpressionCamel stdJSON.RawMessage `json:"wrongExpression"`
	ExpectedFormCamel    stdJSON.RawMessage `json:"expectedForm"`
}

InvalidSyntacticConstantError -

func (*InvalidSyntacticConstantError) Format

Format -

func (*InvalidSyntacticConstantError) String

String -

Jump to

Keyboard shortcuts

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