summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-02-12 19:59:13 +0000
committerCarl Hetherington <cth@carlh.net>2013-02-12 19:59:13 +0000
commitb77dd4f1ef4d6a1c0c36499f82835e0457469dbd (patch)
tree12322b17cb4c9ee544e92a36e5b7093cac5fe0a4 /src
parentf5611190a7b527b10b9cf6b9c082f05ef7b0a8bd (diff)
Tolerate inability to open film metadata.
Diffstat (limited to 'src')
-rw-r--r--src/tools/dvdomatic.cc9
1 files changed, 7 insertions, 2 deletions
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"));