- for (list<boost::filesystem::path>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
- _film->examine_and_add_content (content_factory (_film, *i));
+ 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());