diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2044,8 +2044,8 @@ const CTxOut &txout = tx->vout[i]; nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE); if (!MoneyRange(nCredit)) { - throw std::runtime_error( - "CWalletTx::GetAvailableCredit() : value out of range"); + throw std::runtime_error(std::string(__func__) + + " : value out of range"); } } } @@ -2090,8 +2090,8 @@ const CTxOut &txout = tx->vout[i]; nCredit += pwallet->GetCredit(txout, ISMINE_WATCH_ONLY); if (!MoneyRange(nCredit)) { - throw std::runtime_error( - "CWalletTx::GetAvailableCredit() : value out of range"); + throw std::runtime_error(std::string(__func__) + + ": value out of range"); } } }