diff --git a/src/openrct2/core/IStream.hpp b/src/openrct2/core/IStream.hpp index 81c9425ee3..75bb46f768 100644 --- a/src/openrct2/core/IStream.hpp +++ b/src/openrct2/core/IStream.hpp @@ -16,8 +16,8 @@ #pragma once +#include #include -#include #include #include #include "../common.h" diff --git a/src/openrct2/network/NetworkKey.cpp b/src/openrct2/network/NetworkKey.cpp index a6d4ca57da..12c7e7126a 100644 --- a/src/openrct2/network/NetworkKey.cpp +++ b/src/openrct2/network/NetworkKey.cpp @@ -115,7 +115,7 @@ bool NetworkKey::SavePrivate(IStream * stream) { if (_key == nullptr) { - throw std::exception("No key loaded"); + throw std::runtime_error("No key loaded"); } auto pem = _key->GetPrivate(); stream->Write(pem.data(), pem.size()); @@ -134,7 +134,7 @@ bool NetworkKey::SavePublic(IStream * stream) { if (_key == nullptr) { - throw std::exception("No key loaded"); + throw std::runtime_error("No key loaded"); } auto pem = _key->GetPrivate(); stream->Write(pem.data(), pem.size()); @@ -151,7 +151,7 @@ std::string NetworkKey::PublicKeyString() { if (_key == nullptr) { - throw std::exception("No key loaded"); + throw std::runtime_error("No key loaded"); } return _key->GetPublic(); } diff --git a/test/tests/CMakeLists.txt b/test/tests/CMakeLists.txt index 273be0720e..342bccf9b7 100644 --- a/test/tests/CMakeLists.txt +++ b/test/tests/CMakeLists.txt @@ -154,7 +154,8 @@ target_link_libraries(test_localisation ${GTEST_LIBRARIES} test-common ${LDL} z) add_test(NAME localisation COMMAND test_localisation) # Crypt tests -add_executable(test_crypt "${CMAKE_CURRENT_LIST_DIR}/CryptTests.cpp") +add_executable(test_crypt "${CMAKE_CURRENT_LIST_DIR}/CryptTests.cpp" + "${CMAKE_CURRENT_LIST_DIR}/TestData.cpp") target_link_libraries(test_crypt ${GTEST_LIBRARIES} libopenrct2) add_test(NAME Crypt COMMAND test_crypt)