Log fatal LevelDB errors more verbosely
This commit is contained in:
parent
29fad97c32
commit
f4b68b3f8f
1 changed files with 4 additions and 8 deletions
|
@ -218,14 +218,10 @@ void HandleError(const leveldb::Status& status)
|
|||
{
|
||||
if (status.ok())
|
||||
return;
|
||||
LogPrintf("%s\n", status.ToString());
|
||||
if (status.IsCorruption())
|
||||
throw dbwrapper_error("Database corrupted");
|
||||
if (status.IsIOError())
|
||||
throw dbwrapper_error("Database I/O error");
|
||||
if (status.IsNotFound())
|
||||
throw dbwrapper_error("Database entry missing");
|
||||
throw dbwrapper_error("Unknown database error");
|
||||
const std::string errmsg = "Fatal LevelDB error: " + status.ToString();
|
||||
LogPrintf("%s\n", errmsg);
|
||||
LogPrintf("You can use -debug=leveldb to get more complete diagnostic messages\n");
|
||||
throw dbwrapper_error(errmsg);
|
||||
}
|
||||
|
||||
const std::vector<unsigned char>& GetObfuscateKey(const CDBWrapper &w)
|
||||
|
|
Loading…
Reference in a new issue