diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/content_menu.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index 0adbc775a..2218c5c08 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -36,6 +36,7 @@ using std::cout; using std::vector; +using std::exception; using boost::shared_ptr; using boost::weak_ptr; using boost::dynamic_pointer_cast; @@ -312,7 +313,12 @@ ContentMenu::kdm () wxFileDialog* d = new wxFileDialog (_parent, _("Select KDM")); if (d->ShowModal() == wxID_OK) { - dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ())))); + try { + dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ())))); + } catch (exception& e) { + error_dialog (_parent, wxString::Format (_("Could not load KDM (%s)"), e.what ())); + } + shared_ptr<Film> film = _film.lock (); DCPOMATIC_ASSERT (film); film->examine_content (dcp); |
