aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg_Checks.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-03-22 17:08:59 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-03-22 17:18:01 -0700
commit197d471b42dcffa15e254ec38c654d33f1f050fe (patch)
treeff586d5e860b711040767e1ee94700ace9213817 /toolsrc/src/vcpkg_Checks.cpp
parent5c504265f36d04d6a9bd04e049d0ee53639c8b21 (diff)
downloadvcpkg-197d471b42dcffa15e254ec38c654d33f1f050fe.tar.gz
vcpkg-197d471b42dcffa15e254ec38c654d33f1f050fe.zip
Introduce Checks::exit_with_code() and exit_fail()/exit_success()
Diffstat (limited to 'toolsrc/src/vcpkg_Checks.cpp')
-rw-r--r--toolsrc/src/vcpkg_Checks.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp
index 81e7d3825..4e0f9bfba 100644
--- a/toolsrc/src/vcpkg_Checks.cpp
+++ b/toolsrc/src/vcpkg_Checks.cpp
@@ -24,6 +24,12 @@ namespace vcpkg::Checks
#endif
}
+ void exit_with_code(const LineInfo& line_info, const int exit_code)
+ {
+ print_line_info_if_debug(line_info);
+ exit(exit_code);
+ }
+
__declspec(noreturn) void exit_with_message(const LineInfo& line_info, const char* errorMessage)
{
System::println(System::color::error, errorMessage);