Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/protocol.h
Show All 39 Lines | enum RPCErrorCode { | ||||
// RPC_INTERNAL_ERROR should only be used for genuine errors in bitcoind | // RPC_INTERNAL_ERROR should only be used for genuine errors in bitcoind | ||||
// (for exampled datadir corruption). | // (for exampled datadir corruption). | ||||
RPC_INTERNAL_ERROR = -32603, | RPC_INTERNAL_ERROR = -32603, | ||||
RPC_PARSE_ERROR = -32700, | RPC_PARSE_ERROR = -32700, | ||||
//! General application defined errors | //! General application defined errors | ||||
//!< std::exception thrown in command handling | //!< std::exception thrown in command handling | ||||
RPC_MISC_ERROR = -1, | RPC_MISC_ERROR = -1, | ||||
//!< Server is in safe mode, and command is not allowed in safe mode | |||||
RPC_FORBIDDEN_BY_SAFE_MODE = -2, | |||||
//!< Unexpected type was passed as parameter | //!< Unexpected type was passed as parameter | ||||
RPC_TYPE_ERROR = -3, | RPC_TYPE_ERROR = -3, | ||||
//!< Invalid address or key | //!< Invalid address or key | ||||
RPC_INVALID_ADDRESS_OR_KEY = -5, | RPC_INVALID_ADDRESS_OR_KEY = -5, | ||||
//!< Ran out of memory during operation | //!< Ran out of memory during operation | ||||
RPC_OUT_OF_MEMORY = -7, | RPC_OUT_OF_MEMORY = -7, | ||||
//!< Invalid, missing or duplicate parameter | //!< Invalid, missing or duplicate parameter | ||||
RPC_INVALID_PARAMETER = -8, | RPC_INVALID_PARAMETER = -8, | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | enum RPCErrorCode { | ||||
//!< Wallet is already unlocked | //!< Wallet is already unlocked | ||||
RPC_WALLET_ALREADY_UNLOCKED = -17, | RPC_WALLET_ALREADY_UNLOCKED = -17, | ||||
//!< Invalid wallet specified | //!< Invalid wallet specified | ||||
RPC_WALLET_NOT_FOUND = -18, | RPC_WALLET_NOT_FOUND = -18, | ||||
//!< No wallet specified (error when there are multiple wallets loaded) | //!< No wallet specified (error when there are multiple wallets loaded) | ||||
RPC_WALLET_NOT_SPECIFIED = -19, | RPC_WALLET_NOT_SPECIFIED = -19, | ||||
//!< Backwards compatible aliases | //!< Backwards compatible aliases | ||||
RPC_WALLET_INVALID_ACCOUNT_NAME = RPC_WALLET_INVALID_LABEL_NAME, | RPC_WALLET_INVALID_ACCOUNT_NAME = RPC_WALLET_INVALID_LABEL_NAME, | ||||
//! Unused reserved codes, kept around for backwards compatibility. Do not | |||||
//! reuse. | |||||
//!< Server is in safe mode, and command is not allowed in safe mode | |||||
RPC_FORBIDDEN_BY_SAFE_MODE = -2, | |||||
}; | }; | ||||
UniValue JSONRPCRequestObj(const std::string &strMethod, const UniValue ¶ms, | UniValue JSONRPCRequestObj(const std::string &strMethod, const UniValue ¶ms, | ||||
const UniValue &id); | const UniValue &id); | ||||
UniValue JSONRPCReplyObj(const UniValue &result, const UniValue &error, | UniValue JSONRPCReplyObj(const UniValue &result, const UniValue &error, | ||||
const UniValue &id); | const UniValue &id); | ||||
std::string JSONRPCReply(const UniValue &result, const UniValue &error, | std::string JSONRPCReply(const UniValue &result, const UniValue &error, | ||||
const UniValue &id); | const UniValue &id); | ||||
Show All 14 Lines |