mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Log fatal LevelDB errors more verbosely
This commit is contained in:
parent
29fad97c32
commit
f4b68b3f8f
@ -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 New Issue
Block a user