summaryrefslogtreecommitdiff
path: root/src/dcp.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-08 10:05:49 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-08 10:05:49 +0000
commit83591a4390db550a7d1495b9699c62315e2d7710 (patch)
tree29c93f38853ae2d99c7bca8c7b52d2c294881c0e /src/dcp.cc
parent3a148fab61d2b23379589a4f0f256c21950742b8 (diff)
Throw better file errors (with numbers).
Diffstat (limited to 'src/dcp.cc')
-rw-r--r--src/dcp.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index eaa88367..f80726fc 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -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));