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 | |
| 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')
| -rw-r--r-- | src/lib/image_content.cc | 6 | ||||
| -rw-r--r-- | src/lib/job.cc | 4 |
2 files changed, 7 insertions, 3 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()); } } diff --git a/src/lib/job.cc b/src/lib/job.cc index 52499b433..96aedac65 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -108,7 +108,7 @@ Job::run_wrapper () set_error ( e.what (), - _("It is not known what caused this error. The best idea is to report the problem to the DCP-o-matic mailing list (carl@dcpomatic.com)") + _("It is not known what caused this error. Please report the problem to the DCP-o-matic author (carl@dcpomatic.com).") ); set_progress (1); @@ -118,7 +118,7 @@ Job::run_wrapper () set_error ( _("Unknown error"), - _("It is not known what caused this error. The best idea is to report the problem to the DCP-o-matic mailing list (carl@dcpomatic.com)") + _("It is not known what caused this error. Please report the problem to the DCP-o-matic author (carl@dcpomatic.com).") ); set_progress (1); |
