Re-work again so that there's just one encoder; various tweaks to still-image-with...
[dcpomatic.git] / src / tools / dvdomatic.cc
index d5d5bfc2f906ac21c0a7499c636df5041739a98d..59f3ebc3e05212557a333a730dfcf2f3a04aec3f 100644 (file)
@@ -288,9 +288,13 @@ public:
                
                if (r == wxID_OK) {
                        maybe_save_then_delete_film ();
-                       film.reset (new Film (wx_to_std (c->GetPath ())));
-                       film->log()->set_level (log_level);
-                       set_film ();
+                       try {
+                               film.reset (new Film (wx_to_std (c->GetPath ())));
+                               film->log()->set_level (log_level);
+                               set_film ();
+                       } catch (std::exception& e) {
+                               error_dialog (this, String::compose ("Could not open film at %1 (%2)", wx_to_std (c->GetPath()), e.what()));
+                       }
                }
 
                c->Destroy ();