From e4c2fd6ef1e4e4a7279a0af564a606163ad8c1e7 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Thu, 4 Jul 2024 13:47:17 +0100 Subject: [PATCH] Catch all runtime exceptions while trying to convert items (#600) --- src/main/java/com/Acrobot/ChestShop/Metadata/ItemDatabase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/Acrobot/ChestShop/Metadata/ItemDatabase.java b/src/main/java/com/Acrobot/ChestShop/Metadata/ItemDatabase.java index 9660ebb5..60f04300 100644 --- a/src/main/java/com/Acrobot/ChestShop/Metadata/ItemDatabase.java +++ b/src/main/java/com/Acrobot/ChestShop/Metadata/ItemDatabase.java @@ -104,7 +104,7 @@ private boolean updateMetadataVersion(int previousVersion, int newVersion) { item.setBase64ItemCode(Base64.encodeObject(yaml.dump(itemStack))); itemDao.update(item); updated.getAndIncrement(); - } catch (YAMLException | ClassCastException e) { + } catch (RuntimeException e) { ChestShop.getBukkitLogger().log(Level.SEVERE, "YAML of the item with ID " + Base62.encode(item.getId()) + " (" + item.getId() + ") is corrupted: \n" + serialized); } }