mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-02-15 18:01:22 +01:00
Cleanup: Properly log errors and remove unnecessary early return
This commit is contained in:
parent
ada8cf3ae8
commit
e6a2d2f1c5
@ -28,8 +28,6 @@ public class Migrations {
|
||||
public static int migrate(int currentVersion) {
|
||||
if (currentVersion != CURRENT_DATABASE_VERSION) {
|
||||
ChestShop.getBukkitLogger().info("Updating database...");
|
||||
} else {
|
||||
return CURRENT_DATABASE_VERSION;
|
||||
}
|
||||
|
||||
switch (currentVersion) {
|
||||
@ -67,7 +65,7 @@ public class Migrations {
|
||||
accounts.executeRaw("ALTER TABLE `accounts` ADD COLUMN lastSeenName VARCHAR");
|
||||
return true;
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
ChestShop.getBukkitLogger().log(Level.SEVERE, "Error while migrating database to v2", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -122,7 +120,7 @@ public class Migrations {
|
||||
|
||||
return true;
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
ChestShop.getBukkitLogger().log(Level.SEVERE, "Error while migrating database to v3", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -145,7 +143,7 @@ public class Migrations {
|
||||
|
||||
return true;
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
ChestShop.getBukkitLogger().log(Level.SEVERE, "Error while migrating database to v4", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -355,7 +355,7 @@ public class NameManager implements Listener {
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
ChestShop.getBukkitLogger().log(Level.SEVERE, "Error while trying to setup accounts", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user