diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-20 17:01:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-20 17:01:52 +0100 |
| commit | 0082d0c784a83746d883182ce49ea298f7a1390e (patch) | |
| tree | f1d7caef4cd9a80fa493ad6e3e14f8b177031c61 /src/lib/job.cc | |
| parent | a7dc6ea9175883f439786bd6d15156a24390e109 (diff) | |
Don't crash with bad content (#135).
Diffstat (limited to 'src/lib/job.cc')
| -rw-r--r-- | src/lib/job.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc index 4fbe70771..5d8a68ec0 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -28,6 +28,7 @@ #include "util.h" #include "cross.h" #include "ui_signaller.h" +#include "exceptions.h" #include "i18n.h" @@ -83,6 +84,16 @@ Job::run_wrapper () set_error (e.what(), m); + } catch (OpenFileError& e) { + + set_progress (1); + set_state (FINISHED_ERROR); + + set_error ( + String::compose (_("Could not open %1"), e.file().string()), + String::compose (_("DCP-o-matic could not open the file %1. Perhaps it does not exist or is in an unexpected format."), e.file().string()) + ); + } catch (boost::thread_interrupted &) { set_state (FINISHED_CANCELLED); |
