Commit 65386f52 authored by Max Kellermann's avatar Max Kellermann

db/proxy: throw DatabaseError on error

parent 5b8dce74
......@@ -517,11 +517,9 @@ ProxyDatabase::GetSong(const char *uri, Error &error) const
return nullptr;
}
if (song == nullptr) {
error.Format(db_domain, (int)DatabaseErrorCode::NOT_FOUND,
"No such song: %s", uri);
return nullptr;
}
if (song == nullptr)
throw DatabaseError(DatabaseErrorCode::NOT_FOUND,
"No such song");
return new AllocatedProxySong(song);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment