| 16 | #include "commons/json/json_spirit_value.h" |
| 17 | |
| 18 | void ThrowError(const leveldb::Status &status) { |
| 19 | if (status.ok()) |
| 20 | return; |
| 21 | LogPrint(BCLog::INFO, "%s\n", status.ToString()); |
| 22 | if (status.IsCorruption()) |
| 23 | throw leveldb_error("Database corrupted"); |
| 24 | if (status.IsIOError()) |
| 25 | throw leveldb_error("Database I/O error"); |
| 26 | if (status.IsNotFound()) |
| 27 | throw leveldb_error("Database entry missing"); |
| 28 | throw leveldb_error("Unknown database error"); |
| 29 | } |
| 30 | |
| 31 | std::string CDBOpLogMap::ToString() const { |
| 32 | std::string str = ""; |
no test coverage detected