From bb75aa6326ce8e296ca3d5c50f12c2243ca757d2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 18 Jul 2012 02:14:34 +0100 Subject: Try to catch libdcp::FileError more nicely. --- src/lib/job.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lib') 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 +#include +#include #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); -- cgit v1.2.3