Exceptions

List of exceptions that library can produce.

Exception definitions.

ClientException

P2P network error. This exception is never raised but functions as a superclass for other P2P client exceptions.

DogecoinException

Base class for exceptions received from Dogecoin server.

  • code -- Error code from dogecoind.

DownloadingBlocks

Client is still downloading blocks.

InsufficientFunds

Insufficient funds to complete transaction in wallet or account

InvalidAccountName

Invalid account name

InvalidAddressOrKey

Invalid address or key.

InvalidAmount

Unexpected type was passed as parameter

InvalidParameter

Invalid parameter provided to RPC call.

InvalidTransactionID

Invalid address or key.

JSONTypeError

Unexpected type was passed as parameter

KeypoolRanOut

Keypool ran out, call keypoolrefill first

NotConnected

Not connected to any peers.

OutOfMemory

Out of memory during operation.

SafeMode

Operation denied in safe mode (run dogecoind with -disablesafemode).

SendError

Unspecified problem with wallet (key not found etc.)

TransportException

Class to define transport-level failures.

WalletAlreadyUnlocked

Wallet is already unlocked

WalletEncryptionFailed

Failed to encrypt the wallet

WalletError

Unspecified problem with wallet (key not found etc.)

WalletPassphraseIncorrect

The wallet passphrase entered was incorrect

WalletUnlockNeeded

Enter the wallet passphrase with walletpassphrase first

WalletWrongEncState

Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.)

wrap_exception(error)

Convert a JSON error object to a more specific Dogecoin exception.

Source code in dogecoinrpc/exceptions.py
def wrap_exception(error):
    """
    Convert a JSON error object to a more specific Dogecoin exception.
    """
    # work around to temporarily fix https://github.com/bitcoin/bitcoin/issues/3007
    if error["code"] == DogecoinException.WALLET_ERROR and error["message"] == "Insufficient funds":
        error["code"] = DogecoinException.WALLET_INSUFFICIENT_FUNDS
    return _exception_map.get(error["code"], DogecoinException)(error)