projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b99ebee
)
Try to catch libdcp::FileError more nicely.
author
Carl Hetherington
<cth@carlh.net>
Wed, 18 Jul 2012 01:14:34 +0000
(
02:14
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 18 Jul 2012 01:14:34 +0000
(
02:14
+0100)
src/lib/job.cc
patch
|
blob
|
history
diff --git
a/src/lib/job.cc
b/src/lib/job.cc
index 399b235d9bee7d0264d19da544c4a20f283966d8..0feb73d31b22b00f59d6c5cd6c3dea12c8d38a2e 100644
(file)
--- 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);