projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
edaf690
)
Catch exceptions from content_factory().
author
Carl Hetherington
<cth@carlh.net>
Sun, 28 Feb 2016 18:16:45 +0000
(18:16 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 28 Feb 2016 18:16:45 +0000
(18:16 +0000)
src/wx/content_panel.cc
patch
|
blob
|
history
diff --git
a/src/wx/content_panel.cc
b/src/wx/content_panel.cc
index cefb5b0d90dc795f1bc9a09362490baf031033f3..efc445bc905f36da2db2a597d7a0601176cdacd4 100644
(file)
--- 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::string;
using std::cout;
using std::vector;
+using std::exception;
using boost::shared_ptr;
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
using boost::shared_ptr;
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
@@
-311,7
+312,15
@@
ContentPanel::add_folder_clicked ()
return;
}
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;
if (!content) {
error_dialog (_parent, _("No content found in this folder."));
return;