Ignores "cannot commit" exception on SQLite #433

This commit is contained in:
Rsl1122 2017-11-24 19:39:25 +02:00
parent b341e2f0eb
commit 6e0b29c114

View File

@ -14,6 +14,7 @@ import main.java.com.djrapitops.plan.database.tables.*;
import main.java.com.djrapitops.plan.database.tables.move.Version8TransferTable;
import main.java.com.djrapitops.plan.utilities.MiscUtils;
import org.apache.commons.dbcp2.BasicDataSource;
import org.sqlite.SQLiteException;
import java.sql.Connection;
import java.sql.SQLException;
@ -409,6 +410,10 @@ public abstract class SQLDB extends Database {
if (!usingMySQL) {
connection.commit();
}
} catch (SQLiteException e) {
if (!e.getMessage().contains("cannot commit")) {
Log.toLog(this.getClass().getName(), e);
}
} finally {
returnToPool(connection);
}