aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dbwrapper.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp
index 6cac625abc..fb0d4215a2 100644
--- a/src/dbwrapper.cpp
+++ b/src/dbwrapper.cpp
@@ -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)