Handle concurrent saving error

This commit is contained in:
Nazrin 2024-02-15 17:24:24 -08:00 committed by GitHub
parent 4e8f709ec2
commit 6bfc4aef58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -314,7 +314,11 @@ public final class DatabaseHelper {
}
public static void saveQuest(GameMainQuest quest) {
DatabaseManager.getGameDatastore().save(quest);
try {
DatabaseManager.getGameDatastore().save(quest);
} catch(Exception exception){
Grasscutter.getLogger().error("Failed to save quest m{}",quest.getParentQuestId(), exception);
}
}
public static boolean deleteQuest(GameMainQuest quest) {