diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-06-20 22:07:39 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-06-20 22:07:39 +0200 |
| commit | eb7a7f05ba17143723227495c62d6292b1a2d3f7 (patch) | |
| tree | 1eb6cb19e5f04f48c4995009f63c288bb414cde6 | |
| parent | 731de42c7214e1eb848fc7e73e898ee780cb34fb (diff) | |
Give a better error when map doesn't find an asset.
| -rw-r--r-- | src/lib/map_cli.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/map_cli.cc b/src/lib/map_cli.cc index c49964f80..487d1690d 100644 --- a/src/lib/map_cli.cc +++ b/src/lib/map_cli.cc @@ -298,7 +298,11 @@ map_cli(int argc, char* argv[], std::function<void (string)> out) dcp.resolve_refs(assets); dcp.set_annotation_text(cpls[0]->annotation_text().get_value_or("")); - dcp.write_xml(Config::instance()->signer_chain()); + try { + dcp.write_xml(Config::instance()->signer_chain()); + } catch (dcp::UnresolvedRefError& e) { + return String::compose("%1\nPerhaps you need to give a -d parameter to say where this asset is located.", e.what()); + } return {}; } |
