summaryrefslogtreecommitdiff
path: root/src/lib/job.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-20 17:01:52 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-20 17:01:52 +0100
commit0082d0c784a83746d883182ce49ea298f7a1390e (patch)
treef1d7caef4cd9a80fa493ad6e3e14f8b177031c61 /src/lib/job.cc
parenta7dc6ea9175883f439786bd6d15156a24390e109 (diff)
Don't crash with bad content (#135).
Diffstat (limited to 'src/lib/job.cc')
-rw-r--r--src/lib/job.cc11
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);