From 6259cd7803e8fd5dd06e1239525ea2017b14faf1 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 11 Feb 2024 08:23:01 -0500 Subject: [PATCH] Error handling for parsing of enum --- src/engine/gameManager/DbManager.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/engine/gameManager/DbManager.java b/src/engine/gameManager/DbManager.java index a5abbdb0..619e87ee 100644 --- a/src/engine/gameManager/DbManager.java +++ b/src/engine/gameManager/DbManager.java @@ -288,8 +288,12 @@ public enum DbManager { // Parse the element into an enum; add to the output set - E enumConstant = java.lang.Enum.valueOf(enumClass, element); - enumSet.add(enumConstant); + try { + E enumConstant = java.lang.Enum.valueOf(enumClass, element); + enumSet.add(enumConstant); + } catch (Exception e) { + Logger.error(mysqlSet); + } } // Return the output set