summaryrefslogtreecommitdiff
path: root/test/DumpDatabase.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-12-16 11:12:30 +0100
committerMax Kellermann <max@duempel.org>2015-12-16 11:13:16 +0100
commitd256a0e98f587c0af714c74038ff75903c0903fe (patch)
treeaae75428f19202650f93d5fbd7062b29e612b110 /test/DumpDatabase.cxx
parent6717325c3f28b320fefd308bc7fb326027295aff (diff)
config/ConfigFile: use std::exception on syntax error
Diffstat (limited to 'test/DumpDatabase.cxx')
-rw-r--r--test/DumpDatabase.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx
index 4f00006c7..034428d88 100644
--- a/test/DumpDatabase.cxx
+++ b/test/DumpDatabase.cxx
@@ -32,6 +32,7 @@
#include "tag/TagConfig.hxx"
#include "fs/Path.hxx"
#include "event/Loop.hxx"
+#include "Log.hxx"
#include "util/Error.hxx"
#include <iostream>
@@ -89,7 +90,7 @@ DumpPlaylist(const PlaylistInfo &playlist,
int
main(int argc, char **argv)
-{
+try {
if (argc != 3) {
cerr << "Usage: DumpDatabase CONFIG PLUGIN" << endl;
return 1;
@@ -158,4 +159,7 @@ main(int argc, char **argv)
config_global_finish();
return EXIT_SUCCESS;
-}
+ } catch (const std::exception &e) {
+ LogError(e);
+ return EXIT_FAILURE;
+ }