diff --git a/src/ripple/module/app/main/Main.cpp b/src/ripple/module/app/main/Main.cpp index e112e7114..98ac2c930 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 aa480c8e5..fb51abca7 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 8fabbd9d5..2985cb328 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 c657bb96c..db7d46f27 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