squash! catch ClassCastException in the ItemDatabase update method

This commit is contained in:
Joo200 2023-08-14 20:13:38 +02:00
parent 6aa39cb83b
commit 37bb41e8d5
1 changed files with 2 additions and 2 deletions

View File

@ -103,11 +103,11 @@ public class ItemDatabase {
item.setBase64ItemCode(Base64.encodeObject(yaml.dump(itemStack)));
itemDao.update(item);
updated.getAndIncrement();
} catch (YAMLException e) {
} catch (YAMLException | ClassCastException e) {
ChestShop.getBukkitLogger().log(Level.SEVERE, "YAML of the item with ID " + Base62.encode(item.getId()) + " (" + item.getId() + ") is corrupted: \n" + serialized);
}
}
} catch (IOException | ClassNotFoundException | SQLException | ClassCastException e) {
} catch (IOException | ClassNotFoundException | SQLException e) {
ChestShop.getBukkitLogger().log(Level.SEVERE, "Unable to convert item with ID " + Base62.encode(item.getId()) + " (" + item.getId() + ")", e);
} catch (StackOverflowError e) {
ChestShop.getBukkitLogger().log(Level.SEVERE, "Item with ID " + Base62.encode(item.getId()) + " (" + item.getId() + ") is corrupted. Sorry :(");