diff --git a/src/ripple/module/app/main/Main.cpp b/src/ripple/module/app/main/Main.cpp index e112e71144..98ac2c930d 100644 --- a/src/ripple/module/app/main/Main.cpp +++ b/src/ripple/module/app/main/Main.cpp @@ -23,6 +23,10 @@ #include #include +#if defined(BEAST_LINUX) || defined(BEAST_MAC) || defined(BEAST_BSD) +#include +#endif + namespace po = boost::program_options; namespace ripple { diff --git a/src/ripple/nodestore/backend/HyperDBFactory.cpp b/src/ripple/nodestore/backend/HyperDBFactory.cpp index aa480c8e5a..fb51abca76 100644 --- a/src/ripple/nodestore/backend/HyperDBFactory.cpp +++ b/src/ripple/nodestore/backend/HyperDBFactory.cpp @@ -172,7 +172,10 @@ public: hyperleveldb::WriteOptions const options; - m_db->Write (options, &wb).ok (); + auto ret = m_db->Write (options, &wb); + + if (!ret.ok ()) + throw std::runtime_error ("storeBatch failed: " + ret.ToString()); } void diff --git a/src/ripple/nodestore/backend/LevelDBFactory.cpp b/src/ripple/nodestore/backend/LevelDBFactory.cpp index 8fabbd9d5f..2985cb3283 100644 --- a/src/ripple/nodestore/backend/LevelDBFactory.cpp +++ b/src/ripple/nodestore/backend/LevelDBFactory.cpp @@ -174,7 +174,10 @@ public: leveldb::WriteOptions const options; - m_db->Write (options, &wb).ok (); + auto ret = m_db->Write (options, &wb); + + if (!ret.ok ()) + throw std::runtime_error ("storeBatch failed: " + ret.ToString()); } void diff --git a/src/ripple/nodestore/backend/RocksDBFactory.cpp b/src/ripple/nodestore/backend/RocksDBFactory.cpp index c657bb96cf..db7d46f27b 100644 --- a/src/ripple/nodestore/backend/RocksDBFactory.cpp +++ b/src/ripple/nodestore/backend/RocksDBFactory.cpp @@ -261,7 +261,10 @@ public: rocksdb::WriteOptions const options; - m_db->Write (options, &wb).ok (); + auto ret = m_db->Write (options, &wb); + + if (!ret.ok ()) + throw std::runtime_error ("storeBatch failed: " + ret.ToString()); } void