summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-18 02:14:34 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-18 02:14:34 +0100
commitbb75aa6326ce8e296ca3d5c50f12c2243ca757d2 (patch)
tree97f2e640aef6e29fd82ee01541f1a7d929ae7980
parentb99ebeeeb9fc0ce2b574ff878e33c3edf3b8ce9c (diff)
Try to catch libdcp::FileError more nicely.
-rw-r--r--src/lib/job.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc
index 399b235d9..0feb73d31 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -22,6 +22,8 @@
*/
#include <boost/thread.hpp>
+#include <boost/filesystem.hpp>
+#include <libdcp/exceptions.h>
#include "job.h"
#include "util.h"
@@ -62,6 +64,14 @@ Job::run_wrapper ()
run ();
+ } catch (libdcp::FileError& e) {
+
+ set_progress (1);
+ set_state (FINISHED_ERROR);
+ stringstream s;
+ s << e.what() << "(" << filesystem::path (e.filename()).leaf() << ")";
+ set_error (s.str ());
+
} catch (std::exception& e) {
set_progress (1);