X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fjob.cc;h=3472f27768b5d8082ff09bbfa01230fb2f664b6b;hb=e32f443c7ad4a9e163e76648623de45bec2f4f84;hp=ccb75fa9332379ad27488da0e101ba786c150986;hpb=8e4a2e5ea578ac4f0f41edb6145d5c0040e33ec2;p=dcpomatic.git diff --git a/src/lib/job.cc b/src/lib/job.cc index ccb75fa93..3472f2776 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2016 Carl Hetherington + Copyright (C) 2012-2018 Carl Hetherington This file is part of DCP-o-matic. @@ -28,6 +28,7 @@ #include "exceptions.h" #include "film.h" #include "log.h" +#include "analytics.h" #include "compose.hpp" #include #include @@ -174,6 +175,18 @@ Job::run_wrapper () set_progress (1); set_state (FINISHED_ERROR); + } catch (dcp::DCPReadError& e) { + + set_error (e.what(), "");//message(), e.detail().get_value_or("")); + set_progress (1); + set_state (FINISHED_ERROR); + + } catch (KDMError& e) { + + set_error (e.summary(), e.detail()); + set_progress (1); + set_state (FINISHED_ERROR); + } catch (std::exception& e) { set_error ( @@ -274,11 +287,14 @@ Job::set_state (State s) finished = true; _sub_name.clear (); } + } if (finished) { emit (boost::bind (boost::ref (Finished))); } + + Analytics::instance()->job_state_changed (shared_from_this()); } /** @return DCPTime (in seconds) that this sub-job has been running */