Catch CPLNotFoundError more nicely.
[dcpomatic.git] / src / lib / job.cc
index 8f0a7474f90311ffc8c3fa912bc9b22ca57dad1e..8ce63ced0213d66ea2c03dce79bd3a29579562d0 100644 (file)
@@ -235,6 +235,12 @@ Job::run_wrapper ()
                set_progress (1);
                set_state (FINISHED_ERROR);
 
+       } catch (CPLNotFoundError& e) {
+
+               set_error(e.what());
+               set_progress(1);
+               set_state(FINISHED_ERROR);
+
        } catch (std::exception& e) {
 
                set_error (
@@ -590,9 +596,7 @@ void
 Job::cancel ()
 {
        if (_thread.joinable()) {
-               if (paused_by_user() || paused_by_priority()) {
-                       resume ();
-               }
+               resume();
 
                _thread.interrupt ();
                _thread.join ();