db/DatabaseError: rename enum db_error and make strictly-typed

This commit is contained in:
Max Kellermann
2016-02-07 01:01:10 +01:00
parent f097952b42
commit 0d8e44a079
6 changed files with 30 additions and 22 deletions

View File

@@ -37,7 +37,8 @@ Database *
Instance::GetDatabase(Error &error)
{
if (database == nullptr)
error.Set(db_domain, DB_DISABLED, "No database");
error.Set(db_domain, int(DatabaseErrorCode::DISABLED),
"No database");
return database;
}