db/Interface: GetSong() throws exception on error
This commit is contained in:
@@ -93,11 +93,9 @@ sticker_song_find_cb(const char *uri, const char *value, void *user_data)
|
||||
|
||||
const Database *db = data->db;
|
||||
try {
|
||||
const LightSong *song = db->GetSong(uri, IgnoreError());
|
||||
if (song != nullptr) {
|
||||
data->func(*song, value, data->user_data);
|
||||
db->ReturnSong(song);
|
||||
}
|
||||
const LightSong *song = db->GetSong(uri);
|
||||
data->func(*song, value, data->user_data);
|
||||
db->ReturnSong(song);
|
||||
} catch (const std::runtime_error &e) {
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user