aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-03-13 17:38:04 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-03-13 17:56:21 -0700
commit4114d87a0774fff7d8bc5e041bb56158bfdbcac8 (patch)
tree5afcf15a4de03e9294e5fe3b301cdc902b01ddd6 /toolsrc/src/vcpkg.cpp
parent98ea6780e7a4af7d237783a72a2a56a6188ae3da (diff)
downloadvcpkg-4114d87a0774fff7d8bc5e041bb56158bfdbcac8.tar.gz
vcpkg-4114d87a0774fff7d8bc5e041bb56158bfdbcac8.zip
All Checks now take LineInfo as the first argument
Diffstat (limited to 'toolsrc/src/vcpkg.cpp')
-rw-r--r--toolsrc/src/vcpkg.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp
index 38a648b42..6c81d54f9 100644
--- a/toolsrc/src/vcpkg.cpp
+++ b/toolsrc/src/vcpkg.cpp
@@ -56,13 +56,13 @@ static void inner(const vcpkg_cmd_arguments& args)
}
}
- Checks::check_exit(!vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root.");
+ Checks::check_exit(VCPKG_LINE_INFO, !vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root.");
const expected<vcpkg_paths> expected_paths = vcpkg_paths::create(vcpkg_root_dir);
- Checks::check_exit(!expected_paths.error_code(), "Error: Invalid vcpkg root directory %s: %s", vcpkg_root_dir.string(), expected_paths.error_code().message());
- const vcpkg_paths paths = expected_paths.get_or_throw();
+ Checks::check_exit(VCPKG_LINE_INFO, !expected_paths.error_code(), "Error: Invalid vcpkg root directory %s: %s", vcpkg_root_dir.string(), expected_paths.error_code().message());
+ const vcpkg_paths paths = expected_paths.get_or_throw(VCPKG_LINE_INFO);
int exit_code = _wchdir(paths.root.c_str());
- Checks::check_exit(exit_code == 0, "Changing the working dir failed");
+ Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed");
if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b()))
{
@@ -111,7 +111,7 @@ static void loadConfig()
try
{
- std::string config_contents = Files::read_contents(localappdata / "vcpkg" / "config").get_or_throw();
+ std::string config_contents = Files::read_contents(localappdata / "vcpkg" / "config").get_or_throw(VCPKG_LINE_INFO);
std::unordered_map<std::string, std::string> keys;
auto pghs = Paragraphs::parse_paragraphs(config_contents);
@@ -126,7 +126,7 @@ static void loadConfig()
auto user_id = keys["User-Id"];
auto user_time = keys["User-Since"];
- Checks::check_throw(!user_id.empty() && !user_time.empty(), ""); // Use as goto to the catch statement
+ Checks::check_throw(VCPKG_LINE_INFO, !user_id.empty() && !user_time.empty(), ""); // Use as goto to the catch statement
SetUserInformation(user_id, user_time);
return;
@@ -154,7 +154,7 @@ static void loadConfig()
static std::string trim_path_from_command_line(const std::string& full_command_line)
{
- Checks::check_exit(full_command_line.size() > 0, "Internal failure - cannot have empty command line");
+ Checks::check_exit(VCPKG_LINE_INFO, full_command_line.size() > 0, "Internal failure - cannot have empty command line");
if (full_command_line[0] == '"')
{