Skip to content

Commit

Permalink
GWCA Module Bugfix (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMacocian committed Apr 16, 2024
1 parent 71aa37b commit 5c611ec
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Daybreak.GWCA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()
set(VERSION_MAJOR 0)
set(VERSION_MINOR 9)
set(VERSION_PATCH 9)
set(VERSION_TWEAK 32)
set(VERSION_TWEAK 33)

set(VERSION_RC "${CMAKE_CURRENT_BINARY_DIR}/version.rc")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in" "${VERSION_RC}" @ONLY)
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/EntityNameModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ namespace Daybreak::Modules::EntityNameModule {

WaitingList.emplace_back(id, &promise, name);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Entity Name Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Entity Name Module] Encountered exception: {%s}", e.what());
NamePayload payload;
promise.set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/GameModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,12 @@ namespace Daybreak::Modules::GameModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Game Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Game Module] Encountered exception: {%s}", e.what());
GamePayload payload;
promise->set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/GameStateModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ namespace Daybreak::Modules::GameStateModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Game State Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Game State Module] Encountered exception: {%s}", e.what());
GameStatePayload payload;
promise->set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/InventoryModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ namespace Daybreak::Modules::InventoryModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch(...){
catch (const std::future_error& e) {
printf("[Inventory Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Inventory Module] Encountered exception: {%s}", e.what());
InventoryPayload payload;
promise->set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/ItemNameModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ namespace Daybreak::Modules::ItemNameModule {

WaitingList.emplace_back(id, &promise, name);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Item Name Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Item Name Module] Encountered exception: {%s}", e.what());
NamePayload payload;
promise.set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/LoginModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ namespace Daybreak::Modules::LoginModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Login Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Login Module] Encountered exception: {%s}", e.what());
LoginPayload payload;
promise->set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/MainPlayerModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,12 @@ namespace Daybreak::Modules::MainPlayerModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Main Player Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Main Player Module] Encountered exception: {%s}", e.what());
MainPlayer payload;
promise->set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/MapModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ namespace Daybreak::Modules::MapModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Map Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Map Module] Encountered exception: {%s}", e.what());
MapPayload payload;
promise->set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/PathingMetadataModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ namespace Daybreak::Modules::PathingMetadataModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Pathing Metadata Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Pathing Metadata Module] Encountered exception: {%s}", e.what());
PathingMetadataPayload payload;
promise->set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/PathingModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ namespace Daybreak::Modules::PathingModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Pathing Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Pathing Module] Encountered exception: {%s}", e.what());
PathingPayload payload;
promise->set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/PreGameModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ namespace Daybreak::Modules::PreGameModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Pre Game Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Pre Game Module] Encountered exception: {%s}", e.what());
PreGamePayload payload;
promise->set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/SessionModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ namespace Daybreak::Modules::SessionModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Session Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Session Module] Encountered exception: {%s}", e.what());
SessionPayload payload;
promise->set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/TitleInfoModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ namespace Daybreak::Modules::TitleInfoModule {

WaitingList.emplace_back(payload, &promise, name, 0);
}
catch (...) {
catch (const std::future_error& e) {
printf("[Title Info Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[Title Info Module] Encountered exception: {%s}", e.what());
TitleInfoPayload payload;
promise.set_value(payload);
}
Expand Down
7 changes: 6 additions & 1 deletion Daybreak.GWCA/source/UserModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ namespace Daybreak::Modules::UserModule {
auto payload = GetPayload();
promise->set_value(payload);
}
catch (...) {
catch (const std::future_error& e) {
printf("[User Module] Encountered exception: {%s}", e.what());
continue;
}
catch (const std::exception& e) {
printf("[User Module] Encountered exception: {%s}", e.what());
UserPayload payload;
promise->set_value(payload);
}
Expand Down
3 changes: 2 additions & 1 deletion Daybreak.GWCA/source/WhisperModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ namespace Daybreak::Modules::WhisperModule {
try {
PostMessage(message);
}
catch (...) {
catch (const std::exception& e) {
printf("[Whisper Module] Encountered exception: {%s}", e.what());
}
}
});
Expand Down

0 comments on commit 5c611ec

Please sign in to comment.