errors

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package errors is a generated protocol buffer package.

It is generated from these files:

errors.proto

It has these top-level messages:

Exception

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthErrors = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowErrors   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type Call

type Call struct {
	CallError    CodedError
	NestedErrors []NestedCall
}

func (Call) Error

func (err Call) Error() string

func (Call) ErrorCode

func (err Call) ErrorCode() Code

type Code

type Code uint32
const (
	ErrorCodeGeneric Code = iota
	ErrorCodeUnknownAddress
	ErrorCodeInsufficientBalance
	ErrorCodeInvalidJumpDest
	ErrorCodeInsufficientGas
	ErrorCodeMemoryOutOfBounds
	ErrorCodeCodeOutOfBounds
	ErrorCodeInputOutOfBounds
	ErrorCodeReturnDataOutOfBounds
	ErrorCodeCallStackOverflow
	ErrorCodeCallStackUnderflow
	ErrorCodeDataStackOverflow
	ErrorCodeDataStackUnderflow
	ErrorCodeInvalidContract
	ErrorCodeNativeContractCodeCopy
	ErrorCodeExecutionAborted
	ErrorCodeExecutionReverted
	ErrorCodePermissionDenied
	ErrorCodeNativeFunction
	ErrorCodeEventPublish
	ErrorCodeInvalidString
	ErrorCodeEventMapping
	ErrorCodeInvalidAddress
	ErrorCodeDuplicateAddress
	ErrorCodeInsufficientFunds
	ErrorCodeOverpayment
	ErrorCodeZeroPayment
	ErrorCodeInvalidSequence
	ErrorCodeReservedAddress
)

func (Code) Error

func (c Code) Error() string

func (Code) ErrorCode

func (c Code) ErrorCode() Code

func (Code) String added in v0.20.0

func (c Code) String() string

func (Code) Uint32 added in v0.20.0

func (c Code) Uint32() uint32

type CodedError

type CodedError interface {
	error
	ErrorCode() Code
}

type Exception

type Exception struct {
	Code      Code   `protobuf:"varint,1,opt,name=Code,proto3,casttype=Code" json:"Code,omitempty"`
	Exception string `protobuf:"bytes,2,opt,name=Exception,proto3" json:"Exception,omitempty"`
}

func AsException added in v0.20.0

func AsException(err error) *Exception

Wraps any error as a Exception

func ErrorCodef

func ErrorCodef(errorCode Code, format string, a ...interface{}) *Exception

func Errorf

func Errorf(format string, a ...interface{}) *Exception

func NewException added in v0.20.1

func NewException(errorCode Code, exception string) *Exception

func Wrap

func Wrap(err error, message string) *Exception

func (*Exception) AsError

func (e *Exception) AsError() error

func (*Exception) Descriptor

func (*Exception) Descriptor() ([]byte, []int)

func (*Exception) Error

func (e *Exception) Error() string

func (*Exception) ErrorCode

func (e *Exception) ErrorCode() Code

func (*Exception) GetCode

func (m *Exception) GetCode() Code

func (*Exception) GetException

func (m *Exception) GetException() string

func (*Exception) Marshal added in v0.20.0

func (m *Exception) Marshal() (dAtA []byte, err error)

func (*Exception) MarshalTo added in v0.20.0

func (m *Exception) MarshalTo(dAtA []byte) (int, error)

func (*Exception) ProtoMessage

func (*Exception) ProtoMessage()

func (*Exception) Reset

func (m *Exception) Reset()

func (*Exception) Size added in v0.20.0

func (m *Exception) Size() (n int)

func (*Exception) String

func (e *Exception) String() string

func (*Exception) Unmarshal added in v0.20.0

func (m *Exception) Unmarshal(dAtA []byte) error

func (*Exception) XXX_MessageName added in v0.20.0

func (*Exception) XXX_MessageName() string

type LacksSNativePermission

type LacksSNativePermission struct {
	Address crypto.Address
	SNative string
}

func (LacksSNativePermission) Error

func (e LacksSNativePermission) Error() string

func (LacksSNativePermission) ErrorCode

func (e LacksSNativePermission) ErrorCode() Code

type NestedCall

type NestedCall struct {
	NestedError CodedError
	Caller      crypto.Address
	Callee      crypto.Address
	StackDepth  uint64
}

func (NestedCall) Error

func (err NestedCall) Error() string

func (NestedCall) ErrorCode

func (err NestedCall) ErrorCode() Code

type PermissionDenied

type PermissionDenied struct {
	Address crypto.Address
	Perm    permission.PermFlag
}

func (PermissionDenied) Error

func (err PermissionDenied) Error() string

func (PermissionDenied) ErrorCode

func (err PermissionDenied) ErrorCode() Code

Jump to

Keyboard shortcuts

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