diff --git a/common/common.vcxitems b/common/common.vcxitems index c6f9817..46dceb0 100644 --- a/common/common.vcxitems +++ b/common/common.vcxitems @@ -18,7 +18,6 @@ - @@ -44,7 +43,6 @@ - diff --git a/common/exceptions/openssl_exception.cpp b/common/exceptions/openssl_exception.cpp deleted file mode 100644 index d2c879a..0000000 --- a/common/exceptions/openssl_exception.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "openssl_exception.hpp" -#include - -#pragma comment(lib, "libcrypto") -#pragma comment(lib, "crypt32") // required by libcrypto.lib -#pragma comment(lib, "ws2_32") // required by libcrypto.lib - -namespace nkg::exceptions { - - openssl_exception::openssl_exception(std::string_view file, int line, error_code_t openssl_error_code, std::string_view message) noexcept : - ::nkg::exception(file, line, message) - { - static std::once_flag onceflag_load_crypto_strings; - std::call_once(onceflag_load_crypto_strings, []() { ERR_load_crypto_strings(); }); - - m_error_code = openssl_error_code; - m_error_string = ERR_reason_error_string(m_error_code); - } - -} diff --git a/common/exceptions/openssl_exception.hpp b/common/exceptions/openssl_exception.hpp deleted file mode 100644 index e34f158..0000000 --- a/common/exceptions/openssl_exception.hpp +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once -#include "../exception.hpp" -#include - -namespace nkg::exceptions { - - class openssl_exception final : public ::nkg::exception { - public: - using error_code_t = decltype(ERR_get_error()); - - private: - error_code_t m_error_code; - std::string m_error_string; - - public: - openssl_exception(std::string_view file, int line, error_code_t openssl_error_code, std::string_view message) noexcept; - - [[nodiscard]] - virtual bool error_code_exists() const noexcept override { - return true; - } - - [[nodiscard]] - virtual intptr_t error_code() const noexcept override { - return m_error_code; - } - - [[nodiscard]] - virtual const std::string& error_string() const noexcept override { - return m_error_string; - } - }; - -}