diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-03-13 16:47:19 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-03-13 16:47:19 +0000 |
| commit | da0878773b192f52694fe5719fe08bc4fe271c63 (patch) | |
| tree | 9b8b63d07a91a2cfceb89d46b26afcc2b635c339 | |
| parent | 45625f3116a09d3c8415a54bf8d19fdbb3a3aa9b (diff) | |
| parent | 7d431bf964b377f1402174f8c2d1ac8731f0ed9f (diff) | |
Merge branch 'master' of /home/carl/git/libdcp
| -rw-r--r-- | src/dcp.cc | 16 | ||||
| -rw-r--r-- | src/dcp_time.cc | 2 | ||||
| -rw-r--r-- | src/picture_asset.cc | 38 | ||||
| -rw-r--r-- | src/picture_frame.cc | 8 | ||||
| -rw-r--r-- | src/sound_asset.cc | 34 | ||||
| -rw-r--r-- | src/sound_frame.cc | 4 | ||||
| -rw-r--r-- | src/subtitle_asset.cc | 2 | ||||
| -rw-r--r-- | src/types.cc | 12 | ||||
| -rw-r--r-- | src/util.cc | 6 | ||||
| -rw-r--r-- | src/xml.cc | 20 | ||||
| -rw-r--r-- | wscript | 4 |
11 files changed, 73 insertions, 73 deletions
@@ -182,17 +182,17 @@ DCP::read (bool require_mxfs) if (boost::filesystem::exists (p)) { asset_map.reset (new AssetMap (p.string ())); } else { - throw DCPReadError ("could not find AssetMap file"); + boost::throw_exception (DCPReadError ("could not find AssetMap file")); } } } catch (FileError& e) { - throw FileError ("could not load AssetMap file", files.asset_map); + boost::throw_exception (FileError ("could not load AssetMap file", files.asset_map)); } for (list<shared_ptr<AssetMapAsset> >::const_iterator i = asset_map->assets.begin(); i != asset_map->assets.end(); ++i) { if ((*i)->chunks.size() != 1) { - throw XMLError ("unsupported asset chunk count"); + boost::throw_exception (XMLError ("unsupported asset chunk count")); } boost::filesystem::path t = _directory; @@ -219,24 +219,24 @@ DCP::read (bool require_mxfs) if (files.pkl.empty ()) { files.pkl = t.string(); } else { - throw DCPReadError ("duplicate PKLs found"); + boost::throw_exception (DCPReadError ("duplicate PKLs found")); } } } if (files.cpls.empty ()) { - throw FileError ("no CPL files found", ""); + boost::throw_exception (FileError ("no CPL files found", "")); } if (files.pkl.empty ()) { - throw FileError ("no PKL file found", ""); + boost::throw_exception (FileError ("no PKL file found", "")); } shared_ptr<PKLFile> pkl; try { pkl.reset (new PKLFile (files.pkl)); } catch (FileError& e) { - throw FileError ("could not load PKL file", files.pkl); + boost::throw_exception (FileError ("could not load PKL file", files.pkl)); } /* Cross-check */ @@ -325,7 +325,7 @@ CPL::CPL (string directory, string file, shared_ptr<const AssetMap> asset_map, b try { cpl.reset (new CPLFile (file)); } catch (FileError& e) { - throw FileError ("could not load CPL file", file); + boost::throw_exception (FileError ("could not load CPL file", file)); } /* Now cherry-pick the required bits into our own data structure */ diff --git a/src/dcp_time.cc b/src/dcp_time.cc index 15ad05d4..bdf55f93 100644 --- a/src/dcp_time.cc +++ b/src/dcp_time.cc @@ -59,7 +59,7 @@ Time::Time (string time) vector<string> b; split (b, time, is_any_of (":")); if (b.size() != 4) { - throw DCPReadError ("unrecognised time specification"); + boost::throw_exception (DCPReadError ("unrecognised time specification")); } h = lexical_cast<int> (b[0]); diff --git a/src/picture_asset.cc b/src/picture_asset.cc index d63cdee0..13253242 100644 --- a/src/picture_asset.cc +++ b/src/picture_asset.cc @@ -87,21 +87,21 @@ PictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, list<s ASDCP::JP2K::MXFReader reader_A; if (ASDCP_FAILURE (reader_A.OpenRead (path().string().c_str()))) { - throw MXFFileError ("could not open MXF file for reading", path().string()); + boost::throw_exception (MXFFileError ("could not open MXF file for reading", path().string())); } ASDCP::JP2K::MXFReader reader_B; if (ASDCP_FAILURE (reader_B.OpenRead (other->path().string().c_str()))) { - throw MXFFileError ("could not open MXF file for reading", path().string()); + boost::throw_exception (MXFFileError ("could not open MXF file for reading", path().string())); } ASDCP::JP2K::PictureDescriptor desc_A; if (ASDCP_FAILURE (reader_A.FillPictureDescriptor (desc_A))) { - throw DCPReadError ("could not read video MXF information"); + boost::throw_exception (DCPReadError ("could not read video MXF information")); } ASDCP::JP2K::PictureDescriptor desc_B; if (ASDCP_FAILURE (reader_B.FillPictureDescriptor (desc_B))) { - throw DCPReadError ("could not read video MXF information"); + boost::throw_exception (DCPReadError ("could not read video MXF information")); } if ( @@ -176,12 +176,12 @@ MonoPictureAsset::MonoPictureAsset (string directory, string mxf_name) { ASDCP::JP2K::MXFReader reader; if (ASDCP_FAILURE (reader.OpenRead (path().string().c_str()))) { - throw MXFFileError ("could not open MXF file for reading", path().string()); + boost::throw_exception (MXFFileError ("could not open MXF file for reading", path().string())); } ASDCP::JP2K::PictureDescriptor desc; if (ASDCP_FAILURE (reader.FillPictureDescriptor (desc))) { - throw DCPReadError ("could not read video MXF information"); + boost::throw_exception (DCPReadError ("could not read video MXF information")); } _size.width = desc.StoredWidth; @@ -197,7 +197,7 @@ MonoPictureAsset::construct (boost::function<string (int)> get_path) ASDCP::JP2K::CodestreamParser j2k_parser; ASDCP::JP2K::FrameBuffer frame_buffer (4 * Kumu::Megabyte); if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (get_path(0).c_str(), frame_buffer))) { - throw FileError ("could not open JPEG2000 file for reading", get_path (0)); + boost::throw_exception (FileError ("could not open JPEG2000 file for reading", get_path (0))); } ASDCP::JP2K::PictureDescriptor picture_desc; @@ -209,7 +209,7 @@ MonoPictureAsset::construct (boost::function<string (int)> get_path) ASDCP::JP2K::MXFWriter mxf_writer; if (ASDCP_FAILURE (mxf_writer.OpenWrite (path().string().c_str(), writer_info, picture_desc, 16384, false))) { - throw MXFFileError ("could not open MXF file for writing", path().string()); + boost::throw_exception (MXFFileError ("could not open MXF file for writing", path().string())); } for (int i = 0; i < _intrinsic_duration; ++i) { @@ -217,11 +217,11 @@ MonoPictureAsset::construct (boost::function<string (int)> get_path) string const path = get_path (i); if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (path.c_str(), frame_buffer))) { - throw FileError ("could not open JPEG2000 file for reading", path); + boost::throw_exception (FileError ("could not open JPEG2000 file for reading", path)); } if (ASDCP_FAILURE (mxf_writer.WriteFrame (frame_buffer, 0, 0))) { - throw MiscError ("error in writing video MXF"); + boost::throw_exception (MXFFileError ("error in writing video MXF", this->path().string())); } if (_progress) { @@ -230,7 +230,7 @@ MonoPictureAsset::construct (boost::function<string (int)> get_path) } if (ASDCP_FAILURE (mxf_writer.Finalize())) { - throw MiscError ("error in finalising video MXF"); + boost::throw_exception (MXFFileError ("error in finalising video MXF", path().string())); } } @@ -378,12 +378,12 @@ StereoPictureAsset::StereoPictureAsset (string directory, string mxf_name, int f { ASDCP::JP2K::MXFSReader reader; if (ASDCP_FAILURE (reader.OpenRead (path().string().c_str()))) { - throw MXFFileError ("could not open MXF file for reading", path().string()); + boost::throw_exception (MXFFileError ("could not open MXF file for reading", path().string())); } ASDCP::JP2K::PictureDescriptor desc; if (ASDCP_FAILURE (reader.FillPictureDescriptor (desc))) { - throw DCPReadError ("could not read video MXF information"); + boost::throw_exception (DCPReadError ("could not read video MXF information")); } _size.width = desc.StoredWidth; @@ -447,7 +447,7 @@ void MonoPictureAssetWriter::start (uint8_t* data, int size) { if (ASDCP_FAILURE (_state->j2k_parser.OpenReadFrame (data, size, _state->frame_buffer))) { - throw MiscError ("could not parse J2K frame"); + boost::throw_exception (MiscError ("could not parse J2K frame")); } _state->j2k_parser.FillPictureDescriptor (_state->picture_descriptor); @@ -463,7 +463,7 @@ MonoPictureAssetWriter::start (uint8_t* data, int size) _overwrite) )) { - throw MXFFileError ("could not open MXF file for writing", _asset->path().string()); + boost::throw_exception (MXFFileError ("could not open MXF file for writing", _asset->path().string())); } _started = true; @@ -479,14 +479,14 @@ MonoPictureAssetWriter::write (uint8_t* data, int size) } if (ASDCP_FAILURE (_state->j2k_parser.OpenReadFrame (data, size, _state->frame_buffer))) { - throw MiscError ("could not parse J2K frame"); + boost::throw_exception (MiscError ("could not parse J2K frame")); } uint64_t const before_offset = _state->mxf_writer.Tell (); string hash; if (ASDCP_FAILURE (_state->mxf_writer.WriteFrame (_state->frame_buffer, 0, 0, &hash))) { - throw MiscError ("error in writing video MXF"); + boost::throw_exception (MXFFileError ("error in writing video MXF", _asset->path().string())); } ++_frames_written; @@ -500,7 +500,7 @@ MonoPictureAssetWriter::fake_write (int size) assert (!_finalized); if (ASDCP_FAILURE (_state->mxf_writer.FakeWriteFrame (size))) { - throw MiscError ("error in writing video MXF"); + boost::throw_exception (MXFFileError ("error in writing video MXF", _asset->path().string())); } ++_frames_written; @@ -512,7 +512,7 @@ MonoPictureAssetWriter::finalize () assert (!_finalized); if (ASDCP_FAILURE (_state->mxf_writer.Finalize())) { - throw MiscError ("error in finalizing video MXF"); + boost::throw_exception (MXFFileError ("error in finalizing video MXF", _asset->path().string())); } _finalized = true; diff --git a/src/picture_frame.cc b/src/picture_frame.cc index 5d5f12c2..98802101 100644 --- a/src/picture_frame.cc +++ b/src/picture_frame.cc @@ -42,14 +42,14 @@ MonoPictureFrame::MonoPictureFrame (string mxf_path, int n) { ASDCP::JP2K::MXFReader reader; if (ASDCP_FAILURE (reader.OpenRead (mxf_path.c_str()))) { - throw FileError ("could not open MXF file for reading", mxf_path); + boost::throw_exception (FileError ("could not open MXF file for reading", mxf_path)); } /* XXX: unfortunate guesswork on this buffer size */ _buffer = new ASDCP::JP2K::FrameBuffer (4 * Kumu::Megabyte); if (ASDCP_FAILURE (reader.ReadFrame (n, *_buffer))) { - throw DCPReadError ("could not read video frame"); + boost::throw_exception (DCPReadError ("could not read video frame")); } } @@ -97,14 +97,14 @@ StereoPictureFrame::StereoPictureFrame (string mxf_path, int n) { ASDCP::JP2K::MXFSReader reader; if (ASDCP_FAILURE (reader.OpenRead (mxf_path.c_str()))) { - throw FileError ("could not open MXF file for reading", mxf_path); + boost::throw_exception (FileError ("could not open MXF file for reading", mxf_path)); } /* XXX: unfortunate guesswork on this buffer size */ _buffer = new ASDCP::JP2K::SFrameBuffer (4 * Kumu::Megabyte); if (ASDCP_FAILURE (reader.ReadFrame (n, *_buffer))) { - throw DCPReadError ("could not read video frame"); + boost::throw_exception (DCPReadError ("could not read video frame")); } } diff --git a/src/sound_asset.cc b/src/sound_asset.cc index 4d76a2fd..014b95a2 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -79,12 +79,12 @@ SoundAsset::SoundAsset (string directory, string mxf_name) { ASDCP::PCM::MXFReader reader; if (ASDCP_FAILURE (reader.OpenRead (path().string().c_str()))) { - throw MXFFileError ("could not open MXF file for reading", path().string()); + boost::throw_exception (MXFFileError ("could not open MXF file for reading", path().string())); } ASDCP::PCM::AudioDescriptor desc; if (ASDCP_FAILURE (reader.FillAudioDescriptor (desc))) { - throw DCPReadError ("could not read audio MXF information"); + boost::throw_exception (DCPReadError ("could not read audio MXF information")); } _sampling_rate = desc.AudioSamplingRate.Numerator / desc.AudioSamplingRate.Denominator; @@ -117,7 +117,7 @@ SoundAsset::construct (boost::function<string (Channel)> get_path) ASDCP::PCM::WAVParser pcm_parser_channel[_channels]; if (pcm_parser_channel[0].OpenRead (get_path(LEFT).c_str(), asdcp_edit_rate)) { - throw FileError ("could not open WAV file for reading", get_path(LEFT)); + boost::throw_exception (FileError ("could not open WAV file for reading", get_path(LEFT))); } ASDCP::PCM::AudioDescriptor audio_desc; @@ -149,7 +149,7 @@ SoundAsset::construct (boost::function<string (Channel)> get_path) string const path = get_path (channels[i]); if (ASDCP_FAILURE (pcm_parser_channel[i].OpenRead (path.c_str(), asdcp_edit_rate))) { - throw FileError ("could not open WAV file for reading", path); + boost::throw_exception (FileError ("could not open WAV file for reading", path)); } pcm_parser_channel[i].FillAudioDescriptor (audio_desc_channel[i]); @@ -168,7 +168,7 @@ SoundAsset::construct (boost::function<string (Channel)> get_path) ASDCP::PCM::MXFWriter mxf_writer; if (ASDCP_FAILURE (mxf_writer.OpenWrite (path().string().c_str(), writer_info, audio_desc))) { - throw FileError ("could not open audio MXF for writing", path().string()); + boost::throw_exception (FileError ("could not open audio MXF for writing", path().string())); } for (int i = 0; i < _intrinsic_duration; ++i) { @@ -176,7 +176,7 @@ SoundAsset::construct (boost::function<string (Channel)> get_path) for (int j = 0; j < _channels; ++j) { memset (frame_buffer_channel[j].Data(), 0, frame_buffer_channel[j].Capacity()); if (ASDCP_FAILURE (pcm_parser_channel[j].ReadFrame (frame_buffer_channel[j]))) { - throw MiscError ("could not read audio frame"); + boost::throw_exception (MiscError ("could not read audio frame")); } } @@ -195,7 +195,7 @@ SoundAsset::construct (boost::function<string (Channel)> get_path) } if (ASDCP_FAILURE (mxf_writer.WriteFrame (frame_buffer, 0, 0))) { - throw MiscError ("could not write audio MXF frame"); + boost::throw_exception (MiscError ("could not write audio MXF frame")); } if (_progress) { @@ -204,7 +204,7 @@ SoundAsset::construct (boost::function<string (Channel)> get_path) } if (ASDCP_FAILURE (mxf_writer.Finalize())) { - throw MiscError ("could not finalise audio MXF"); + boost::throw_exception (MiscError ("could not finalise audio MXF")); } } @@ -230,21 +230,21 @@ SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, list<str ASDCP::PCM::MXFReader reader_A; if (ASDCP_FAILURE (reader_A.OpenRead (path().string().c_str()))) { - throw MXFFileError ("could not open MXF file for reading", path().string()); + boost::throw_exception (MXFFileError ("could not open MXF file for reading", path().string())); } ASDCP::PCM::MXFReader reader_B; if (ASDCP_FAILURE (reader_B.OpenRead (other->path().string().c_str()))) { - throw MXFFileError ("could not open MXF file for reading", path().string()); + boost::throw_exception (MXFFileError ("could not open MXF file for reading", path().string())); } ASDCP::PCM::AudioDescriptor desc_A; if (ASDCP_FAILURE (reader_A.FillAudioDescriptor (desc_A))) { - throw DCPReadError ("could not read audio MXF information"); + boost::throw_exception (DCPReadError ("could not read audio MXF information")); } ASDCP::PCM::AudioDescriptor desc_B; if (ASDCP_FAILURE (reader_B.FillAudioDescriptor (desc_B))) { - throw DCPReadError ("could not read audio MXF information"); + boost::throw_exception (DCPReadError ("could not read audio MXF information")); } if ( @@ -269,11 +269,11 @@ SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, list<str for (int i = 0; i < _intrinsic_duration; ++i) { if (ASDCP_FAILURE (reader_A.ReadFrame (i, buffer_A))) { - throw DCPReadError ("could not read audio frame"); + boost::throw_exception (DCPReadError ("could not read audio frame")); } if (ASDCP_FAILURE (reader_B.ReadFrame (i, buffer_B))) { - throw DCPReadError ("could not read audio frame"); + boost::throw_exception (DCPReadError ("could not read audio frame")); } if (buffer_A.Size() != buffer_B.Size()) { @@ -341,7 +341,7 @@ SoundAssetWriter::SoundAssetWriter (SoundAsset* a) MXFAsset::fill_writer_info (&_state->writer_info, _asset->uuid ()); if (ASDCP_FAILURE (_state->mxf_writer.OpenWrite (_asset->path().string().c_str(), _state->writer_info, _state->audio_desc))) { - throw FileError ("could not open audio MXF for writing", _asset->path().string()); + boost::throw_exception (FileError ("could not open audio MXF for writing", _asset->path().string())); } } @@ -376,7 +376,7 @@ void SoundAssetWriter::write_current_frame () { if (ASDCP_FAILURE (_state->mxf_writer.WriteFrame (_state->frame_buffer, 0, 0))) { - throw MiscError ("could not write audio MXF frame"); + boost::throw_exception (MiscError ("could not write audio MXF frame")); } ++_frames_written; @@ -390,7 +390,7 @@ SoundAssetWriter::finalize () } if (ASDCP_FAILURE (_state->mxf_writer.Finalize())) { - throw MiscError ("could not finalise audio MXF"); + boost::throw_exception (MiscError ("could not finalise audio MXF")); } _finalized = true; diff --git a/src/sound_frame.cc b/src/sound_frame.cc index ed626f5e..c2a10564 100644 --- a/src/sound_frame.cc +++ b/src/sound_frame.cc @@ -29,14 +29,14 @@ SoundFrame::SoundFrame (string mxf_path, int n) { ASDCP::PCM::MXFReader reader; if (ASDCP_FAILURE (reader.OpenRead (mxf_path.c_str()))) { - throw FileError ("could not open MXF file for reading", mxf_path); + boost::throw_exception (FileError ("could not open MXF file for reading", mxf_path)); } /* XXX: unfortunate guesswork on this buffer size */ _buffer = new ASDCP::PCM::FrameBuffer (1 * Kumu::Megabyte); if (ASDCP_FAILURE (reader.ReadFrame (n, *_buffer))) { - throw DCPReadError ("could not read audio frame"); + boost::throw_exception (DCPReadError ("could not read audio frame")); } } diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc index c7051eae..ba91cf90 100644 --- a/src/subtitle_asset.cc +++ b/src/subtitle_asset.cc @@ -413,7 +413,7 @@ SubtitleAsset::write_xml (ostream& s) const << " <Language>" << _language << "</Language>\n"; if (_load_font_nodes.size() > 1) { - throw MiscError ("multiple LoadFont nodes not supported"); + boost::throw_exception (MiscError ("multiple LoadFont nodes not supported")); } if (!_load_font_nodes.empty ()) { diff --git a/src/types.cc b/src/types.cc index ac01ae45..693b9ab2 100644 --- a/src/types.cc +++ b/src/types.cc @@ -15,7 +15,7 @@ Fraction::Fraction (string s) vector<string> b; split (b, s, is_any_of (" ")); if (b.size() != 2) { - throw XMLError ("malformed fraction " + s + " in XML node"); + boost::throw_exception (XMLError ("malformed fraction " + s + " in XML node")); } numerator = lexical_cast<int> (b[0]); denominator = lexical_cast<int> (b[1]); @@ -57,7 +57,7 @@ Color::Color (string argb_hex) { int alpha; if (sscanf (argb_hex.c_str(), "%2x%2x%2x%2x", &alpha, &r, &g, &b) < 4) { - throw XMLError ("could not parse colour string"); + boost::throw_exception (XMLError ("could not parse colour string")); } } @@ -118,7 +118,7 @@ libdcp::effect_to_string (Effect e) return "shadow"; } - throw MiscError ("unknown effect type"); + boost::throw_exception (MiscError ("unknown effect type")); } Effect @@ -132,7 +132,7 @@ libdcp::string_to_effect (string s) return SHADOW; } - throw DCPReadError ("unknown subtitle effect type"); + boost::throw_exception (DCPReadError ("unknown subtitle effect type")); } string @@ -147,7 +147,7 @@ libdcp::valign_to_string (VAlign v) return "bottom"; } - throw MiscError ("unknown valign type"); + boost::throw_exception (MiscError ("unknown valign type")); } VAlign @@ -161,7 +161,7 @@ libdcp::string_to_valign (string s) return BOTTOM; } - throw DCPReadError ("unknown subtitle valign type"); + boost::throw_exception (DCPReadError ("unknown subtitle valign type")); } diff --git a/src/util.cc b/src/util.cc index bd5f32ed..a6d65374 100644 --- a/src/util.cc +++ b/src/util.cc @@ -67,7 +67,7 @@ libdcp::make_digest (string filename) { Kumu::FileReader reader; if (ASDCP_FAILURE (reader.OpenRead (filename.c_str ()))) { - throw FileError ("could not open file to compute digest", filename); + boost::throw_exception (FileError ("could not open file to compute digest", filename)); } SHA_CTX sha; @@ -82,7 +82,7 @@ libdcp::make_digest (string filename) if (r == Kumu::RESULT_ENDOFFILE) { break; } else if (ASDCP_FAILURE (r)) { - throw FileError ("could not read file to compute digest", filename); + boost::throw_exception (FileError ("could not read file to compute digest", filename)); } SHA1_Update (&sha, read_buffer.Data(), read); @@ -188,7 +188,7 @@ libdcp::decompress_j2k (uint8_t* data, int64_t size, int reduce) if (!image) { opj_destroy_decompress (decoder); opj_cio_close (cio); - throw DCPReadError ("could not decode JPEG2000 codestream"); + boost::throw_exception (DCPReadError ("could not decode JPEG2000 codestream")); } opj_cio_close (cio); @@ -29,9 +29,9 @@ XMLNode::node_child (string name) { list<xmlpp::Node*> n = node_children (name); if (n.size() > 1) { - throw XMLError ("duplicate XML tag " + name); + boost::throw_exception (XMLError ("duplicate XML tag " + name)); } else if (n.empty ()) { - throw XMLError ("missing XML tag " + name + " in " + _node->get_name()); + boost::throw_exception (XMLError ("missing XML tag " + name + " in " + _node->get_name())); } return n.front (); @@ -68,7 +68,7 @@ XMLNode::optional_string_child (string name) { list<xmlpp::Node*> nodes = node_children (name); if (nodes.size() > 2) { - throw XMLError ("duplicate XML tag " + name); + boost::throw_exception (XMLError ("duplicate XML tag " + name)); } if (nodes.empty ()) { @@ -103,7 +103,7 @@ XMLNode::optional_int64_child (string name) { list<xmlpp::Node*> nodes = node_children (name); if (nodes.size() > 2) { - throw XMLError ("duplicate XML tag " + name); + boost::throw_exception (XMLError ("duplicate XML tag " + name)); } if (nodes.empty ()) { @@ -136,12 +136,12 @@ XMLNode::string_attribute (string name) { xmlpp::Element const * e = dynamic_cast<const xmlpp::Element *> (_node); if (!e) { - throw XMLError ("missing attribute"); + boost::throw_exception (XMLError ("missing attribute")); } xmlpp::Attribute* a = e->get_attribute (name); if (!a) { - throw XMLError ("missing attribute"); + boost::throw_exception (XMLError ("missing attribute")); } return a->get_value (); @@ -218,7 +218,7 @@ XMLNode::done () xmlpp::Node::NodeList c = _node->get_children (); for (xmlpp::Node::NodeList::iterator i = c.begin(); i != c.end(); ++i) { if (dynamic_cast<xmlpp::Element *> (*i) && find (_taken.begin(), _taken.end(), (*i)->get_name()) == _taken.end ()) { - throw XMLError ("unexpected XML node " + (*i)->get_name()); + boost::throw_exception (XMLError ("unexpected XML node " + (*i)->get_name())); } } } @@ -242,18 +242,18 @@ XMLNode::content () XMLFile::XMLFile (string file, string root_name) { if (!filesystem::exists (file)) { - throw FileError ("XML file does not exist", file); + boost::throw_exception (FileError ("XML file does not exist", file)); } _parser = new xmlpp::DomParser; _parser->parse_file (file); if (!_parser) { - throw XMLError ("could not parse XML"); + boost::throw_exception (XMLError ("could not parse XML")); } _node = _parser->get_document()->get_root_node (); if (_node->get_name() != root_name) { - throw XMLError ("unrecognised root node"); + boost::throw_exception (XMLError ("unrecognised root node")); } } @@ -2,7 +2,7 @@ import subprocess import os APPNAME = 'libdcp' -VERSION = '0.40pre' +VERSION = '0.41pre' def options(opt): opt.load('compiler_cxx') @@ -108,7 +108,7 @@ def build(bld): bld.add_post_fun(post) def dist(ctx): - ctx.excl = 'TODO core *~ .git build .waf* .lock* doc/*~ src/*~ test/ref/*~ __pycache__' + ctx.excl = 'TODO core *~ .git build .waf* .lock* doc/*~ src/*~ test/ref/*~ __pycache__ GPATH GRTAGS GSYMS GTAGS' def create_version_cc(bld, version): if os.path.exists('.git'): |
