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 /src/dcp.cc | |
| parent | 45625f3116a09d3c8415a54bf8d19fdbb3a3aa9b (diff) | |
| parent | 7d431bf964b377f1402174f8c2d1ac8731f0ed9f (diff) | |
Merge branch 'master' of /home/carl/git/libdcp
Diffstat (limited to 'src/dcp.cc')
| -rw-r--r-- | src/dcp.cc | 16 |
1 files changed, 8 insertions, 8 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 */ |
