Added helpful message for API authors

Helps debug issue for missing database object default constructors.
This commit is contained in:
tastybento 2018-12-01 21:25:58 -08:00
parent e23818f73d
commit 68ec5e48cb

View File

@ -66,8 +66,11 @@ public class Database<T> {
try {
result = handler.loadObject(uniqueId);
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException
| ClassNotFoundException | IntrospectionException | NoSuchMethodException | SecurityException e) {
| ClassNotFoundException | IntrospectionException | SecurityException e) {
logger.severe(() -> "Could not load object from database! " + e.getMessage());
} catch (NoSuchMethodException e) {
logger.severe(() -> "Could not load object from database! " + e.getMessage());
logger.severe(() -> "Did you forget the JavaBean no-arg default constructor?");
}
return result;
}