aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg_Dependencies.cpp
diff options
context:
space:
mode:
authorDaniel Shaw <t-dansha@microsoft.com>2017-06-05 15:58:47 -0700
committerDaniel Shaw <t-dansha@microsoft.com>2017-06-06 14:02:59 -0700
commit264cd050e6280e5b87ec055e0a9d8985a7ba30b3 (patch)
treef508fa927970257011747643f893b182691dac1e /toolsrc/src/vcpkg_Dependencies.cpp
parent7b4d83c444b0e7fee241ed293614efca17c67201 (diff)
downloadvcpkg-264cd050e6280e5b87ec055e0a9d8985a7ba30b3.tar.gz
vcpkg-264cd050e6280e5b87ec055e0a9d8985a7ba30b3.zip
ExpectedT factory class
Diffstat (limited to 'toolsrc/src/vcpkg_Dependencies.cpp')
-rw-r--r--toolsrc/src/vcpkg_Dependencies.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp
index acfb55239..ea5832e46 100644
--- a/toolsrc/src/vcpkg_Dependencies.cpp
+++ b/toolsrc/src/vcpkg_Dependencies.cpp
@@ -174,11 +174,14 @@ namespace vcpkg::Dependencies
if (auto bpgh = maybe_bpgh.get())
return InstallPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type};
- Expected<SourceParagraph> maybe_spgh =
+ ExpectedT<SourceParagraph, ParseControlErrorInfo> maybe_spgh =
Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec));
if (auto spgh = maybe_spgh.get())
return InstallPlanAction{spec, {nullopt, nullopt, *spgh}, request_type};
+ else
+ print_error_message(maybe_spgh.error());
+
Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec);
}
};
@@ -283,11 +286,14 @@ namespace vcpkg::Dependencies
if (auto bpgh = maybe_bpgh.get())
return ExportPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type};
- Expected<SourceParagraph> maybe_spgh =
+ ExpectedT<SourceParagraph, ParseControlErrorInfo> maybe_spgh =
Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec));
if (auto spgh = maybe_spgh.get())
return ExportPlanAction{spec, {nullopt, nullopt, *spgh}, request_type};
+ else
+ print_error_message(maybe_spgh.error());
+
Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec);
}
};