diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/content_panel.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index cefb5b0d9..efc445bc9 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -46,6 +46,7 @@ using std::list; using std::string; using std::cout; using std::vector; +using std::exception; using boost::shared_ptr; using boost::weak_ptr; using boost::dynamic_pointer_cast; @@ -311,7 +312,15 @@ ContentPanel::add_folder_clicked () return; } - shared_ptr<Content> content = content_factory (_film, path); + shared_ptr<Content> content; + + try { + content = content_factory (_film, path); + } catch (exception& e) { + error_dialog (_parent, e.what()); + return; + } + if (!content) { error_dialog (_parent, _("No content found in this folder.")); return; |
