xerr

package
v0.0.0-...-3f3ae68 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const BUILD_TRANSACTION_ERROR uint32 = 400003 //构造交易失败
View Source
const CALCULATE_GAS_FEE_ERROR uint32 = 400001 // 计算gasFee失败

转账模块

View Source
const CHAIN_DB_COIN_TABLEERROR uint32 = 300003 //查询数据库币表信息失败
View Source
const CHAIN_GET_ABI_ERROR uint32 = 300004 //获取ABI失败
View Source
const CHAIN_RPC_ERROR uint32 = 300001 // 链rpc调用失败

链模块

View Source
const CHAIN_RPC_TIMEOUT_ERROR uint32 = 300002 //链调用超时
View Source
const CHAIN_SEND_TRANSACTION_ERROR uint32 = 400004 //发送交易失败
View Source
const DB_ERROR uint32 = 100005
View Source
const DB_UPDATE_AFFECTED_ZERO_ERROR uint32 = 100006
View Source
const OK uint32 = 200

成功返回

View Source
const REUQEST_PARAM_ERROR uint32 = 100002
View Source
const SEND_TRANSACTION_ERROR uint32 = 400002 //发起交易失败
View Source
const SERVER_COMMON_ERROR uint32 = 100001

全局错误码

View Source
const TOKEN_EXPIRE_ERROR uint32 = 100003
View Source
const TOKEN_GENERATE_ERROR uint32 = 100004
View Source
const WALLET_CREATE_ADDRESS_ERROR uint32 = 200002 // 钱包地址生成失败
View Source
const WALLET_CREATE_ADDRESS_EXIST_ERROR uint32 = 200003 // 钱包地址未存在
View Source
const WALLET_CREATE_ADDRESS_INSERT_ERROR uint32 = 200004 // 钱包地址验证失败
View Source
const WALLET_CREATE_ERROR uint32 = 200001 // 钱包创建失败

钱包创建模块

View Source
const WALLET_CREATE_TRADEPWD_ERROR uint32 = 200005 // 交易密码验证失败
View Source
const WALLET_CREATE_TRADEPWD_SET_ERROR uint32 = 200006 // 设置交易密码失败
View Source
const WALLET_RESET_TRADEPWD_ERROR uint32 = 200007 //重置密码失败
View Source
const WALLET_VERIFY_MNEMONIC_ERROR uint32 = 200008 // 验证助记词失败

Variables

This section is empty.

Functions

func IsCodeErr

func IsCodeErr(errcode uint32) bool

func MapErrMsg

func MapErrMsg(errcode uint32) string

Types

type CodeError

type CodeError struct {
	// contains filtered or unexported fields
}

func NewErrCode

func NewErrCode(errCode uint32) *CodeError

func NewErrCodeMsg

func NewErrCodeMsg(errCode uint32, errMsg string) *CodeError

func NewErrMsg

func NewErrMsg(errMsg string) *CodeError

func (*CodeError) Error

func (e *CodeError) Error() string

func (*CodeError) GetErrCode

func (e *CodeError) GetErrCode() uint32

返回给前端的错误码

func (*CodeError) GetErrMsg

func (e *CodeError) GetErrMsg() string

返回给前端显示端错误信息

Jump to

Keyboard shortcuts

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