diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-04-27 20:50:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-04-27 20:50:13 +0100 |
| commit | a4afc8e3dd6ce7c5f02d0eb69f03bf9f043afed0 (patch) | |
| tree | e9557ef5be1824e68b47c21b0d8980995053ba92 /src/lib/image_content.cc | |
| parent | 2be230e3923fa75d41cd3218f9f54da199a1273c (diff) | |
Open an error dialogue on uncaught exceptions in the main loop. Check that the ImageContent constructor found some valid files when scanning a folder.
Diffstat (limited to 'src/lib/image_content.cc')
| -rw-r--r-- | src/lib/image_content.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc index 13f7c52e3..3b87fcf00 100644 --- a/src/lib/image_content.cc +++ b/src/lib/image_content.cc @@ -44,7 +44,11 @@ ImageContent::ImageContent (shared_ptr<const Film> f, boost::filesystem::path p) _paths.push_back (i->path ()); } } - + + if (_paths.empty()) { + throw FileError (_("No valid image files were found in the folder."), p); + } + sort (_paths.begin(), _paths.end()); } } |
