Main, ...: catch any exception, not just std::runtime_error
This commit is contained in:
@@ -23,8 +23,6 @@
|
||||
#include "db/LightSong.hxx"
|
||||
#include "DetachedSong.hxx"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
static bool
|
||||
UpdatePlaylistSong(const Database &db, DetachedSong &song)
|
||||
{
|
||||
@@ -36,7 +34,7 @@ UpdatePlaylistSong(const Database &db, DetachedSong &song)
|
||||
const LightSong *original;
|
||||
try {
|
||||
original = db.GetSong(song.GetURI());
|
||||
} catch (const std::runtime_error &e) {
|
||||
} catch (...) {
|
||||
/* not found - shouldn't happen, because the update
|
||||
thread should ensure that all stale Song instances
|
||||
have been purged */
|
||||
|
@@ -29,6 +29,8 @@
|
||||
#include "util/StringCompare.hxx"
|
||||
#include "Log.hxx"
|
||||
|
||||
#include <exception>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define PRIO_LABEL "Prio: "
|
||||
@@ -96,8 +98,8 @@ queue_load_song(TextFile &file, const SongLoader &loader,
|
||||
|
||||
try {
|
||||
song = song_load(file, uri);
|
||||
} catch (const std::runtime_error &e) {
|
||||
LogError(e);
|
||||
} catch (...) {
|
||||
LogError(std::current_exception());
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user