Catch all runtime exceptions while trying to convert items (#600)

This commit is contained in:
Phoenix616 2024-07-04 13:47:17 +01:00
parent 64c3126e7a
commit e4c2fd6ef1
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0

View File

@ -104,7 +104,7 @@ public class ItemDatabase {
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);
}
}