Eliminate last usage of Checks::check_throw()
MODIFY
src/vcpkg.cpp
src/vcpkg.cpp
@@ -128,15 +128,14 @@ static void loadConfig()
auto user_id = keys["User-Id"];
auto user_time = keys["User-Since"];
- Checks::check_throw(VCPKG_LINE_INFO, !user_id.empty() && !user_time.empty(), ""); // Use as goto to the catch statement
-
+ if (!user_id.empty() && !user_time.empty())
+ {
SetUserInformation(user_id, user_time);
return;
}
}
- catch (...)
- {
}
+ catch (...) { }
// config file not found, could not be read, or invalid
std::string user_id, user_time;
@@ -150,9 +149,7 @@ static void loadConfig()
<< "User-Id: " << user_id << "\n"
<< "User-Since: " << user_time << "\n";
}
- catch (...)
- {
- }
+ catch (...) { }
}
static std::string trim_path_from_command_line(const std::string& full_command_line)

Eliminate last usage of Checks::check_throw()