From b77dd4f1ef4d6a1c0c36499f82835e0457469dbd Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 12 Feb 2013 19:59:13 +0000 Subject: Tolerate inability to open film metadata. --- src/tools/dvdomatic.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index 3281fc113..be47b4fe6 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -51,6 +51,7 @@ using std::wstring; using std::stringstream; using std::map; using std::make_pair; +using std::exception; using boost::shared_ptr; static FilmEditor* film_editor = 0; @@ -440,8 +441,12 @@ class App : public wxApp dvdomatic_setup (); if (!film_to_load.empty() && boost::filesystem::is_directory (film_to_load)) { - film.reset (new Film (film_to_load)); - film->log()->set_level (log_level); + try { + film.reset (new Film (film_to_load)); + film->log()->set_level (log_level); + } catch (exception& e) { + error_dialog (0, String::compose ("Could not load film %1 (%2)", film_to_load, e.what())); + } } Frame* f = new Frame (_("DVD-o-matic")); -- cgit v1.2.3