Wrap unimportant sql migrations in try..catch (#755)
This commit is contained in:
parent
b8c5c60ece
commit
4fda89d5c8
@ -205,6 +205,7 @@ public class SqlDao extends AbstractDao {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// migrations
|
// migrations
|
||||||
|
try {
|
||||||
if (!(this.provider instanceof SQLiteConnectionFactory) && !(this.provider instanceof PostgreConnectionFactory)) {
|
if (!(this.provider instanceof SQLiteConnectionFactory) && !(this.provider instanceof PostgreConnectionFactory)) {
|
||||||
try (Connection connection = this.provider.getConnection()) {
|
try (Connection connection = this.provider.getConnection()) {
|
||||||
try (Statement s = connection.createStatement()) {
|
try (Statement s = connection.createStatement()) {
|
||||||
@ -213,6 +214,10 @@ public class SqlDao extends AbstractDao {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.plugin.getLog().severe("Error occurred whilst initialising the database.");
|
this.plugin.getLog().severe("Error occurred whilst initialising the database.");
|
||||||
|
Loading…
Reference in New Issue
Block a user