diff options
| author | Alexander Saprykin <xelfium@gmail.com> | 2018-05-26 13:27:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-26 13:27:14 +0200 |
| commit | 4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5 (patch) | |
| tree | d95c9490352eb73f078d34a33bc4bb44ac9fa48b /toolsrc/src/vcpkg_Checks.cpp | |
| parent | fb689bd13dd6ba563a885d71fff1dd2b32a615db (diff) | |
| parent | 2ac7527b40b1dbeb7856b9f763362c1e139e2ca9 (diff) | |
| download | vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.tar.gz vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.zip | |
Merge pull request #1 from Microsoft/master
Update vcpkg from upstream
Diffstat (limited to 'toolsrc/src/vcpkg_Checks.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg_Checks.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp deleted file mode 100644 index 2674b889a..000000000 --- a/toolsrc/src/vcpkg_Checks.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Checks.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -namespace vcpkg::Checks -{ - [[noreturn]] void unreachable(const LineInfo& line_info) - { - System::println(System::Color::error, "Error: Unreachable code was reached"); - System::println(System::Color::error, line_info.to_string()); // Always print line_info here -#ifndef NDEBUG - std::abort(); -#else - ::exit(EXIT_FAILURE); -#endif - } - - [[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code) - { - Debug::println(System::Color::error, line_info.to_string()); - ::exit(exit_code); - } - - [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView errorMessage) - { - System::println(System::Color::error, errorMessage); - exit_fail(line_info); - } - - void check_exit(const LineInfo& line_info, bool expression) - { - if (!expression) - { - exit_with_message(line_info, ""); - } - } - - void check_exit(const LineInfo& line_info, bool expression, const CStringView errorMessage) - { - if (!expression) - { - exit_with_message(line_info, errorMessage); - } - } -} |
