Fix erroneous check wrt intrinsic duration.
[dcpomatic.git] / src / lib / job.cc
index 3309fe16c64393b6a961841677512f8db02254f6..896862d143f7c9c7c26514d4e17d1e7d966652f5 100644 (file)
@@ -33,6 +33,7 @@ using std::stringstream;
 using boost::shared_ptr;
 
 /** @param s Film that we are operating on.
+ *  @param req Job that must be completed before this job is run.
  */
 Job::Job (shared_ptr<Film> f, shared_ptr<Job> req)
        : _film (f)
@@ -74,9 +75,16 @@ Job::run_wrapper ()
                set_state (FINISHED_ERROR);
                set_error (e.what ());
 
+       } catch (...) {
+
+               set_progress (1);
+               set_state (FINISHED_ERROR);
+               set_error ("unknown exception");
+
        }
 }
 
+/** @return true if this job is new (ie has not started running) */
 bool
 Job::is_new () const
 {