diff options
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); - } - } -} |
