diff options
author | Max Kellermann <max@musicpd.org> | 2016-10-29 09:45:34 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2016-10-29 09:45:34 +0200 |
commit | 90a14e14f457e7ec34dd8ff3dcfe710e2dd93208 (patch) | |
tree | d12ec940506c2a51fee437e5499ea248a99b7650 /src/queue/QueueSave.cxx | |
parent | dea46e8d5a714a483aee8e14775eb8b3a69aa4ad (diff) |
db/simple/Save: migrate from class Error to C++ exceptions
Diffstat (limited to 'src/queue/QueueSave.cxx')
-rw-r--r-- | src/queue/QueueSave.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/queue/QueueSave.cxx b/src/queue/QueueSave.cxx index a67172795..f1fa89497 100644 --- a/src/queue/QueueSave.cxx +++ b/src/queue/QueueSave.cxx @@ -27,7 +27,6 @@ #include "fs/io/TextFile.hxx" #include "fs/io/BufferedOutputStream.hxx" #include "util/StringCompare.hxx" -#include "util/Error.hxx" #include "Log.hxx" #include <stdlib.h> @@ -95,10 +94,10 @@ queue_load_song(TextFile &file, const SongLoader &loader, if ((p = StringAfterPrefix(line, SONG_BEGIN))) { const char *uri = p; - Error error; - song = song_load(file, uri, error); - if (song == nullptr) { - LogError(error); + try { + song = song_load(file, uri); + } catch (const std::runtime_error &e) { + LogError(e); return; } } else { |