summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-08-05 18:33:26 +0100
committerCarl Hetherington <cth@carlh.net>2015-08-05 18:33:26 +0100
commit3cfa54a879ebad50ceb8dd472412f53b4e0e7ee6 (patch)
treef24624e6cc14b22b19c470d40758a9551e259637 /src
parentf967eb61fc9ed326e7946a33a03e552484ad92f7 (diff)
Fix heinous thinko in previous.
Diffstat (limited to 'src')
-rw-r--r--src/lib/job.cc21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc
index a266fbe07..def874ba2 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -84,6 +84,8 @@ Job::run_wrapper ()
}
set_error (e.what(), m);
+ set_progress (1);
+ set_state (FINISHED_ERROR);
} catch (OpenFileError& e) {
@@ -92,6 +94,9 @@ Job::run_wrapper ()
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())
);
+ set_progress (1);
+ set_state (FINISHED_ERROR);
+
} catch (boost::filesystem::filesystem_error& e) {
if (e.code() == boost::system::errc::no_such_file_or_directory) {
@@ -106,15 +111,18 @@ Job::run_wrapper ()
);
}
+ set_progress (1);
+ set_state (FINISHED_ERROR);
+
} catch (boost::thread_interrupted &) {
set_state (FINISHED_CANCELLED);
- /* This is the only one that is not FINISHED_ERROR; need to return */
- return;
} catch (std::bad_alloc& e) {
set_error (_("Out of memory"), _("There was not enough memory to do this."));
+ set_progress (1);
+ set_state (FINISHED_ERROR);
} catch (std::exception& e) {
@@ -123,16 +131,19 @@ Job::run_wrapper ()
string (_("It is not known what caused this error.")) + " " + REPORT_PROBLEM
);
+ set_progress (1);
+ set_state (FINISHED_ERROR);
+
} catch (...) {
set_error (
_("Unknown error"),
string (_("It is not known what caused this error.")) + " " + REPORT_PROBLEM
);
- }
- set_progress (1);
- set_state (FINISHED_ERROR);
+ set_progress (1);
+ set_state (FINISHED_ERROR);
+ }
}
/** @return true if this job is new (ie has not started running) */