summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-12-06 15:26:19 +0100
committerCarl Hetherington <cth@carlh.net>2019-12-06 15:26:19 +0100
commitfea83d9ef5d02149f857a11de79ed266773fd5a1 (patch)
treebec6ddd21d44fb8788b562938c48cd80bf1c6ce0
parente466fedb9faf18db2e1b1672fcdd2f7b7056d1ef (diff)
Adjust for changes to libdcp API.
-rw-r--r--src/lib/dcp.cc10
-rw-r--r--src/lib/job.cc6
2 files changed, 5 insertions, 11 deletions
diff --git a/src/lib/dcp.cc b/src/lib/dcp.cc
index 2db49bda5..48b704777 100644
--- a/src/lib/dcp.cc
+++ b/src/lib/dcp.cc
@@ -72,15 +72,15 @@ DCP::cpls () const
LOG_GENERAL ("Reading %1 DCP directories", _dcp_content->directories().size());
BOOST_FOREACH (boost::filesystem::path i, _dcp_content->directories()) {
shared_ptr<dcp::DCP> dcp (new dcp::DCP (i));
- list<shared_ptr<dcp::DCPReadError> > errors;
- dcp->read (_tolerant, &errors, true);
+ list<dcp::VerificationNote> notes;
+ dcp->read (&notes, true);
if (!_tolerant) {
/** We accept and ignore EmptyAssetPathError but everything else is bad */
- BOOST_FOREACH (shared_ptr<dcp::DCPReadError> j, errors) {
- if (dynamic_pointer_cast<dcp::EmptyAssetPathError>(j)) {
+ BOOST_FOREACH (dcp::VerificationNote j, notes) {
+ if (j.code() == dcp::VerificationNote::Code::EMPTY_ASSET_PATH) {
LOG_WARNING("Empty path in ASSETMAP of %1", i.string());
} else {
- boost::throw_exception(*j.get());
+ boost::throw_exception(dcp::DCPReadError(dcp::note_to_string(j)));
}
}
}
diff --git a/src/lib/job.cc b/src/lib/job.cc
index 43b5fb7e1..8966a65e7 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -180,12 +180,6 @@ Job::run_wrapper ()
set_progress (1);
set_state (FINISHED_ERROR);
- } catch (dcp::MissingAssetError& e) {
-
- set_error (e.message(), e.path().string());
- set_progress (1);
- set_state (FINISHED_ERROR);
-
} catch (dcp::DCPReadError& e) {
set_error (e.message(), e.detail().get_value_or(""));