diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-08 10:05:49 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-08 10:05:49 +0000 |
| commit | 83591a4390db550a7d1495b9699c62315e2d7710 (patch) | |
| tree | 29c93f38853ae2d99c7bca8c7b52d2c294881c0e /src/dcp.cc | |
| parent | 3a148fab61d2b23379589a4f0f256c21950742b8 (diff) | |
Throw better file errors (with numbers).
Diffstat (limited to 'src/dcp.cc')
| -rw-r--r-- | src/dcp.cc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -228,7 +228,7 @@ DCP::read_assets () } } catch (FileError& e) { - boost::throw_exception (FileError ("could not load AssetMap file", _files.asset_map)); + boost::throw_exception (FileError ("could not load AssetMap file", _files.asset_map, e.number ())); } for (list<shared_ptr<libdcp::parse::AssetMapAsset> >::const_iterator i = asset_map->assets.begin(); i != asset_map->assets.end(); ++i) { @@ -266,18 +266,18 @@ DCP::read_assets () } if (_files.cpls.empty ()) { - boost::throw_exception (FileError ("no CPL files found", "")); + boost::throw_exception (DCPReadError ("no CPL files found")); } if (_files.pkl.empty ()) { - boost::throw_exception (FileError ("no PKL file found", "")); + boost::throw_exception (DCPReadError ("no PKL file found")); } shared_ptr<parse::PKL> pkl; try { pkl.reset (new parse::PKL (_files.pkl)); } catch (FileError& e) { - boost::throw_exception (FileError ("could not load PKL file", _files.pkl)); + boost::throw_exception (FileError ("could not load PKL file", _files.pkl, e.number ())); } _asset_maps.push_back (make_pair (boost::filesystem::absolute (_directory).string(), asset_map)); |
