mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-20 07:55:07 +02:00
Log fatal LevelDB errors more verbosely
This commit is contained in:
@ -218,14 +218,10 @@ void HandleError(const leveldb::Status& status)
|
|||||||
{
|
{
|
||||||
if (status.ok())
|
if (status.ok())
|
||||||
return;
|
return;
|
||||||
LogPrintf("%s\n", status.ToString());
|
const std::string errmsg = "Fatal LevelDB error: " + status.ToString();
|
||||||
if (status.IsCorruption())
|
LogPrintf("%s\n", errmsg);
|
||||||
throw dbwrapper_error("Database corrupted");
|
LogPrintf("You can use -debug=leveldb to get more complete diagnostic messages\n");
|
||||||
if (status.IsIOError())
|
throw dbwrapper_error(errmsg);
|
||||||
throw dbwrapper_error("Database I/O error");
|
|
||||||
if (status.IsNotFound())
|
|
||||||
throw dbwrapper_error("Database entry missing");
|
|
||||||
throw dbwrapper_error("Unknown database error");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<unsigned char>& GetObfuscateKey(const CDBWrapper &w)
|
const std::vector<unsigned char>& GetObfuscateKey(const CDBWrapper &w)
|
||||||
|
Reference in New Issue
Block a user