MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / ThrowError

Function ThrowError

src/persistence/leveldbwrapper.cpp:18–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16#include "commons/json/json_spirit_value.h"
17
18void 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
31std::string CDBOpLogMap::ToString() const {
32 std::string str = "";

Callers 4

CLevelDBWrapperMethod · 0.85
WriteBatchMethod · 0.85
ReadMethod · 0.85
ExistsMethod · 0.85

Calls 6

leveldb_errorClass · 0.85
IsCorruptionMethod · 0.80
IsIOErrorMethod · 0.80
IsNotFoundMethod · 0.80
okMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected