#include "Socket/Error.hpp" #include "spdlog/spdlog.h" namespace Chattr::error { void critical(gsl::czstring msg) { #ifdef _WIN32 //TODO 윈도우에서 구현할 것 #elif __linux__ gsl::czstring msgbuf = strerror(errno); #else #error "이 플랫폼은 지원되지 않습니다." #endif spdlog::critical(msgbuf); std::exit(EXIT_FAILURE); } void error(gsl::czstring msg) { #ifdef _WIN32 //TODO 윈도우에서 구현할 것 #elif __linux__ gsl::czstring msgbuf = strerror(errno); #else #error "이 플랫폼은 지원되지 않습니다." #endif spdlog::error(msgbuf); } }