From b029cb06c4e0fca1fad9fecd78939efe5532fa9a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 14 Apr 2020 21:02:56 +0200 Subject: [PATCH] DCPReadError -> ReadError in libdcp. --- src/lib/atmos_mxf_content.cc | 2 +- src/lib/dcp.cc | 2 +- src/lib/dcp_content.cc | 6 +++--- src/lib/dcp_examiner.cc | 2 +- src/lib/image_examiner.cc | 2 +- src/lib/job.cc | 2 +- src/lib/types.cc | 2 +- src/lib/video_mxf_content.cc | 4 ++-- src/lib/video_mxf_decoder.cc | 4 ++-- src/lib/video_mxf_examiner.cc | 2 +- src/tools/dcpomatic_player.cc | 2 +- src/wx/content_menu.cc | 2 +- src/wx/content_view.cc | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/lib/atmos_mxf_content.cc b/src/lib/atmos_mxf_content.cc index fa27f600b..581b1b2f0 100644 --- a/src/lib/atmos_mxf_content.cc +++ b/src/lib/atmos_mxf_content.cc @@ -56,7 +56,7 @@ AtmosMXFContent::valid_mxf (boost::filesystem::path path) return true; } catch (dcp::MXFFileError& e) { - } catch (dcp::DCPReadError& e) { + } catch (dcp::ReadError& e) { } diff --git a/src/lib/dcp.cc b/src/lib/dcp.cc index 565b17229..c62b339fa 100644 --- a/src/lib/dcp.cc +++ b/src/lib/dcp.cc @@ -80,7 +80,7 @@ DCP::cpls () const if (j.code() == dcp::VerificationNote::EMPTY_ASSET_PATH) { LOG_WARNING("Empty path in ASSETMAP of %1", i.string()); } else { - boost::throw_exception(dcp::DCPReadError(dcp::note_to_string(j))); + boost::throw_exception(dcp::ReadError(dcp::note_to_string(j))); } } } diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index d0f434e5a..52ac6132c 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -549,7 +549,7 @@ DCPContent::can_reference (shared_ptr film, function reel_list; try { reel_list = reels (film); - } catch (dcp::DCPReadError &) { + } catch (dcp::ReadError &) { /* We couldn't read the DCP; it's probably missing */ return false; } catch (dcp::KDMDecryptionError &) { @@ -627,7 +627,7 @@ DCPContent::can_reference_audio (shared_ptr film, string& why_not) c shared_ptr decoder; try { decoder.reset (new DCPDecoder (film, shared_from_this(), false, film->tolerant(), shared_ptr())); - } catch (dcp::DCPReadError &) { + } catch (dcp::ReadError &) { /* We couldn't read the DCP, so it's probably missing */ return false; } catch (DCPError &) { @@ -662,7 +662,7 @@ DCPContent::can_reference_text (shared_ptr film, TextType type, stri shared_ptr decoder; try { decoder.reset (new DCPDecoder (film, shared_from_this(), false, film->tolerant(), shared_ptr())); - } catch (dcp::DCPReadError &) { + } catch (dcp::ReadError &) { /* We couldn't read the DCP, so it's probably missing */ return false; } catch (dcp::KDMDecryptionError &) { diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 8866ba721..9bf401125 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -219,7 +219,7 @@ DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) i->main_subtitle()->asset()->subtitles (); } } - } catch (dcp::DCPReadError& e) { + } catch (dcp::ReadError& e) { _kdm_valid = false; } catch (dcp::MiscError& e) { _kdm_valid = false; diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index 775a69eeb..b9ef89865 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -57,7 +57,7 @@ ImageExaminer::ImageExaminer (shared_ptr film, shared_ptrsize (); - } catch (dcp::DCPReadError& e) { + } catch (dcp::ReadError& e) { delete[] buffer; throw DecodeError (String::compose (_("Could not decode JPEG2000 file %1 (%2)"), path, e.what ())); } diff --git a/src/lib/job.cc b/src/lib/job.cc index a4ea9ec6f..0feda6435 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -214,7 +214,7 @@ Job::run_wrapper () set_progress (1); set_state (FINISHED_ERROR); - } catch (dcp::DCPReadError& e) { + } catch (dcp::ReadError& e) { set_error (e.message(), e.detail().get_value_or("")); set_progress (1); diff --git a/src/lib/types.cc b/src/lib/types.cc index 9806c9971..9519b3097 100644 --- a/src/lib/types.cc +++ b/src/lib/types.cc @@ -197,7 +197,7 @@ CPLSummary::CPLSummary (boost::filesystem::path p) list notes; dcp.read (¬es); if (!notes.empty()) { - throw dcp::DCPReadError(dcp::note_to_string(notes.front())); + throw dcp::ReadError(dcp::note_to_string(notes.front())); } cpl_id = dcp.cpls().front()->id(); diff --git a/src/lib/video_mxf_content.cc b/src/lib/video_mxf_content.cc index bf8bb9f46..0c905a624 100644 --- a/src/lib/video_mxf_content.cc +++ b/src/lib/video_mxf_content.cc @@ -59,7 +59,7 @@ VideoMXFContent::valid_mxf (boost::filesystem::path path) return true; } catch (dcp::MXFFileError& e) { - } catch (dcp::DCPReadError& e) { + } catch (dcp::ReadError& e) { } @@ -69,7 +69,7 @@ VideoMXFContent::valid_mxf (boost::filesystem::path path) return true; } catch (dcp::MXFFileError& e) { - } catch (dcp::DCPReadError& e) { + } catch (dcp::ReadError& e) { } diff --git a/src/lib/video_mxf_decoder.cc b/src/lib/video_mxf_decoder.cc index 4482606f0..030db64ef 100644 --- a/src/lib/video_mxf_decoder.cc +++ b/src/lib/video_mxf_decoder.cc @@ -44,7 +44,7 @@ VideoMXFDecoder::VideoMXFDecoder (shared_ptr film, shared_ptrpath(0))); } catch (dcp::MXFFileError& e) { /* maybe it's stereo */ - } catch (dcp::DCPReadError& e) { + } catch (dcp::ReadError& e) { /* maybe it's stereo */ } @@ -55,7 +55,7 @@ VideoMXFDecoder::VideoMXFDecoder (shared_ptr film, shared_ptr content) _asset.reset (new dcp::MonoPictureAsset (content->path(0))); } catch (dcp::MXFFileError& e) { /* maybe it's stereo */ - } catch (dcp::DCPReadError& e) { + } catch (dcp::ReadError& e) { /* maybe it's stereo */ } diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 8ee657261..7009d17ce 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -400,7 +400,7 @@ public: #ifndef DCPOMATIC_VARIANT_SWAROOP Config::instance()->add_to_player_history (dir); #endif - } catch (dcp::DCPReadError& e) { + } catch (dcp::ReadError& e) { error_dialog (this, wxString::Format(_("Could not load a DCP from %s"), std_to_wx(dir.string())), std_to_wx(e.what())); } } diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index c5dc1606d..7cb924a73 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -142,7 +142,7 @@ ContentMenu::popup (weak_ptr film, ContentList c, TimelineContentViewList ); item->Check (dcp->cpl() && dcp->cpl() == i->id()); } - } catch (dcp::DCPReadError &) { + } catch (dcp::ReadError &) { /* The DCP is probably missing */ } catch (dcp::KDMDecryptionError &) { /* We have an incorrect KDM */ diff --git a/src/wx/content_view.cc b/src/wx/content_view.cc index 1cdfbc00f..d4e18108d 100644 --- a/src/wx/content_view.cc +++ b/src/wx/content_view.cc @@ -96,7 +96,7 @@ ContentView::update () } } catch (boost::filesystem::filesystem_error& e) { /* Never mind */ - } catch (dcp::DCPReadError& e) { + } catch (dcp::ReadError& e) { /* Never mind */ } } -- 2.30.2