From c45265b0852deb82d673c12e877cbdd1212f5796 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 4 Jan 2024 13:59:13 -0500 Subject: [PATCH] Error trap added --- src/engine/gameManager/MaintenanceManager.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/engine/gameManager/MaintenanceManager.java b/src/engine/gameManager/MaintenanceManager.java index 574768d8..d72db7a5 100644 --- a/src/engine/gameManager/MaintenanceManager.java +++ b/src/engine/gameManager/MaintenanceManager.java @@ -45,10 +45,13 @@ public enum MaintenanceManager { // Deduct upkeep and build list of buildings // which did not have funds available - for (Building building : maintList) - if (chargeUpkeep(building) == false) - derankList.add(building); - + try { + for (Building building : maintList) + if (chargeUpkeep(building) == false) + derankList.add(building); + } catch (Exception e) { + Logger.error(e); + } // Reset maintenance dates for these buildings for (Building building : maintList)