!Improved loading error messages

This commit is contained in:
Indyuce 2020-08-15 13:10:48 +02:00
parent 91d59112c7
commit 6827c0051b

View File

@ -66,11 +66,10 @@ public class MMOLoadManager {
if (found != null)
return found;
} catch (IllegalArgumentException | JsonParseException | IndexOutOfBoundsException exception) {
throw new IllegalArgumentException("Could not load '" + config.toString() + "': " + exception.getMessage());
throw new IllegalArgumentException(exception.getMessage());
}
}
throw new IllegalArgumentException(
"Could not load '" + config.toString() + "': Could not find corresponding " + c.getSimpleName() + " in database");
throw new IllegalArgumentException("Could not find corresponding " + c.getSimpleName() + " in database");
}
}