Add some console output on a failure to load the configuration.
authorCarl Hetherington <cth@carlh.net>
Sat, 26 Oct 2013 22:48:24 +0000 (23:48 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 26 Oct 2013 22:48:24 +0000 (23:48 +0100)
src/lib/config.cc

index b30da5746e93fada8302e5002d8d85183c27e1fb..0b1b99e227d74d275a2efd3527222377a7f2ed04 100644 (file)
@@ -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";
                }
        }