summaryrefslogtreecommitdiff
path: root/src/wx/content_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-05-13 21:50:06 +0100
committerCarl Hetherington <cth@carlh.net>2017-05-13 21:50:06 +0100
commit320c20b9538c985005dc850d685eecfc1a5edc98 (patch)
tree52f416fe4b5e5a1471abb44769c6668d0197069b /src/wx/content_panel.cc
parentb37249ba5db6bd08fdfe340cec923130ee4cc7b9 (diff)
Give a slightly better error whn trying to add a KDM using add-file (#1035).
Diffstat (limited to 'src/wx/content_panel.cc')
-rw-r--r--src/wx/content_panel.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index 7b6979163..446bf1121 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -612,9 +612,13 @@ ContentPanel::add_files (list<boost::filesystem::path> paths)
/* XXX: check for lots of files here and do something */
- BOOST_FOREACH (boost::filesystem::path i, paths) {
- BOOST_FOREACH (shared_ptr<Content> j, content_factory (_film, i)) {
- _film->examine_and_add_content (j);
+ try {
+ BOOST_FOREACH (boost::filesystem::path i, paths) {
+ BOOST_FOREACH (shared_ptr<Content> j, content_factory (_film, i)) {
+ _film->examine_and_add_content (j);
+ }
}
+ } catch (exception& e) {
+ error_dialog (_parent, e.what());
}
}