MCPcopy Create free account
hub / github.com/LUX-Core/lux / HandleError

Function HandleError

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

Source from the content-addressed store, hash-verified

16#include <memenv.h>
17
18void HandleError(const leveldb::Status& status)
19{
20 if (status.ok())
21 return;
22 LogPrintf("%s\n", status.ToString());
23 if (status.IsCorruption())
24 throw leveldb_error("Database corrupted");
25 if (status.IsIOError())
26 throw leveldb_error("Database I/O error");
27 if (status.IsNotFound())
28 throw leveldb_error("Database entry missing");
29 throw leveldb_error("Unknown database error");
30}
31
32static void SetMaxOpenFiles(leveldb::Options *options) {
33 // On most platforms the default setting of max_open_files (which is 1000)

Callers 7

CLevelDBWrapperMethod · 0.85
WriteBatchMethod · 0.85
ReadMethod · 0.85
ExistsMethod · 0.85
CheckAndHandleErrorMethod · 0.85
CheckAndHandleErrorMethod · 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