From bdf139bd50ace75551d92fcf41b51c57083670b3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 26 Oct 2013 23:48:24 +0100 Subject: Add some console output on a failure to load the configuration. --- src/lib/config.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/config.cc b/src/lib/config.cc index b30da5746..0b1b99e22 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -42,6 +42,8 @@ using std::string; using std::ofstream; using std::list; using std::max; +using std::exception; +using std::cerr; using boost::shared_ptr; using boost::lexical_cast; using boost::optional; @@ -257,10 +259,13 @@ Config::instance () _instance = new Config; try { _instance->read (); - } catch (...) { + } catch (exception& e) { /* configuration load failed; never mind, just stick with the default. */ + cerr << "dcpomatic: failed to load configuration (" << e.what() << "\n"; + } catch (...) { + cerr << "dcpomatic: failed to load configuration\n"; } } -- cgit v1.2.3