Reverted to using an explicit throw of all exceptions

This commit is contained in:
Tastybento 2018-02-07 19:28:29 -08:00
parent e4fbc6fab1
commit 08b2e2579b

View File

@ -39,13 +39,13 @@ public interface ISettings<T> {
// --------------- Loader ------------------ // --------------- Loader ------------------
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
default T loadSettings() throws Exception { default T loadSettings() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException, ClassNotFoundException, IntrospectionException, SQLException {
// See if this settings object already exists in the database // See if this settings object already exists in the database
AbstractDatabaseHandler<T> dbhandler = (AbstractDatabaseHandler<T>) BSBDatabase.getDatabase().getHandler(this.getClass()); AbstractDatabaseHandler<T> dbhandler = (AbstractDatabaseHandler<T>) BSBDatabase.getDatabase().getHandler(this.getClass());
T dbConfig = null; T dbConfig = null;
if (dbhandler.objectExits(this.getUniqueId())) { if (dbhandler.objectExits(this.getUniqueId())) {
// Load it // Load it
dbConfig = dbhandler.loadObject(getUniqueId()); dbConfig = dbhandler.loadObject(getUniqueId());
} }
// Get the handler // Get the handler
AbstractDatabaseHandler<T> configHandler = (AbstractDatabaseHandler<T>) new FlatFileDatabase().getHandler(getInstance().getClass()); AbstractDatabaseHandler<T> configHandler = (AbstractDatabaseHandler<T>) new FlatFileDatabase().getHandler(getInstance().getClass());