diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-07 20:25:36 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-07 20:25:36 +0100 |
| commit | 9fa643bdebdcb39cca4b529f13fdd0fbfd721d58 (patch) | |
| tree | 75e07bfe05b9db372ccb9319aedf6d98270e2bbd /src/lib/config.cc | |
| parent | c2930f166cad691fb5302d9924e109443bf2365f (diff) | |
Catch exceptions on loading config.
Diffstat (limited to 'src/lib/config.cc')
| -rw-r--r-- | src/lib/config.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index b6f464717..3beb0aea6 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -61,7 +61,11 @@ Config::Config () _allowed_dcp_frame_rates.push_back (48); _allowed_dcp_frame_rates.push_back (50); _allowed_dcp_frame_rates.push_back (60); +} +void +Config::read () +{ if (!boost::filesystem::exists (file (false))) { read_old_metadata (); return; @@ -199,6 +203,13 @@ Config::instance () { if (_instance == 0) { _instance = new Config; + try { + _instance->read (); + } catch (...) { + /* configuration load failed; never mind, just + stick with the default. + */ + } } return _instance; |
