summaryrefslogtreecommitdiff
path: root/tools/minicargo/repository.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2018-03-10 16:34:25 +0800
committerJohn Hodge <tpg@mutabah.net>2018-03-17 18:52:16 +0800
commit239dfb122273766783d8bd8acbf67b45934bbb9c (patch)
treef413a99952030d90fd641ca366e4a81366a24686 /tools/minicargo/repository.cpp
parenta8db3fa4d52e667525cb200c0052e51d9e5b6e41 (diff)
downloadmrust-239dfb122273766783d8bd8acbf67b45934bbb9c.tar.gz
minicargo - Handle wildcard dependencies
Diffstat (limited to 'tools/minicargo/repository.cpp')
-rw-r--r--tools/minicargo/repository.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/minicargo/repository.cpp b/tools/minicargo/repository.cpp
index c0b39b5a..ebe660f1 100644
--- a/tools/minicargo/repository.cpp
+++ b/tools/minicargo/repository.cpp
@@ -139,7 +139,14 @@ void Repository::load_vendored(const ::helpers::path& path)
{
throw "TODO: Download package";
}
- best->loaded_manifest = ::std::shared_ptr<PackageManifest>( new PackageManifest(PackageManifest::load_from_toml(best->manifest_path)) );
+ try
+ {
+ best->loaded_manifest = ::std::shared_ptr<PackageManifest>( new PackageManifest(PackageManifest::load_from_toml(best->manifest_path)) );
+ }
+ catch(const ::std::exception& e)
+ {
+ throw ::std::runtime_error( format("Error loading manifest '", best->manifest_path, "' - ", e.what()) );
+ }
}
return best->loaded_manifest;