aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <[email protected]>2012-05-22 23:07:46 +0000
committerLuke Dashjr <[email protected]>2012-05-22 23:07:46 +0000
commita49927a46d578d142411c52b17c6f11bb19da03d (patch)
tree90f2c7ecaee23e2e9539e9264a44c803290cff4e /src/bitcoinrpc.cpp
parentRemove duplicate behavior on MacOSX (diff)
parentMerge branch '0.5.x' into 0.6.0.x (diff)
downloaddiscoin-a49927a46d578d142411c52b17c6f11bb19da03d.tar.xz
discoin-a49927a46d578d142411c52b17c6f11bb19da03d.zip
Merge branch '0.6.0.x' into 0.6.x
Conflicts: bitcoin-qt.pro doc/README doc/README_windows.txt share/setup.nsi src/bitcoinrpc.h src/db.h src/headers.h src/init.cpp src/main.cpp src/main.h src/noui.h src/qt/bitcoin.cpp src/qt/locale/bitcoin_en.ts src/qt/walletmodel.cpp src/script.cpp src/ui_interface.h src/util.cpp
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r--src/bitcoinrpc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index cf6e4fb6b..a954050b3 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -839,7 +839,8 @@ Value movecmd(const Array& params, bool fHelp)
strComment = params[4].get_str();
CWalletDB walletdb(pwalletMain->strWalletFile);
- walletdb.TxnBegin();
+ if (!walletdb.TxnBegin())
+ throw JSONRPCError(-20, "database error");
int64 nNow = GetAdjustedTime();
@@ -861,7 +862,8 @@ Value movecmd(const Array& params, bool fHelp)
credit.strComment = strComment;
walletdb.WriteAccountingEntry(credit);
- walletdb.TxnCommit();
+ if (!walletdb.TxnCommit())
+ throw JSONRPCError(-20, "database error");
return true;
}