mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
[FIX] Дополнительные проверки для более понятной ошибки
This commit is contained in:
parent
be4c2f4b07
commit
84e5f91fdf
4 changed files with 26 additions and 4 deletions
|
@ -165,6 +165,10 @@ public void verify() {
|
|||
if (env == null) {
|
||||
throw new NullPointerException("Env must not be null");
|
||||
}
|
||||
if(netty == null)
|
||||
{
|
||||
throw new NullPointerException("Netty must not be null");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,9 +89,9 @@ public synchronized Connection getConnection() throws SQLException {
|
|||
// Set HikariCP pool
|
||||
// Replace source with hds
|
||||
source = new HikariDataSource(cfg);
|
||||
LogHelper.info("HikariCP pooling enabled for '%s'", poolName);
|
||||
LogHelper.warning("HikariCP pooling enabled for '%s'", poolName);
|
||||
} catch (ClassNotFoundException ignored) {
|
||||
LogHelper.warning("HikariCP isn't in classpath for '%s'", poolName);
|
||||
LogHelper.debug("HikariCP isn't in classpath for '%s'", poolName);
|
||||
}
|
||||
}
|
||||
return source.getConnection();
|
||||
|
|
|
@ -391,6 +391,24 @@ public void verify() {
|
|||
|
||||
// Client launcher
|
||||
VerifyHelper.verify(getTitle(), VerifyHelper.NOT_EMPTY, "Main class can't be empty");
|
||||
for(String s : classPath)
|
||||
{
|
||||
if(s == null) throw new IllegalArgumentException("Found null entry in classPath");
|
||||
}
|
||||
for(String s : jvmArgs)
|
||||
{
|
||||
if(s == null) throw new IllegalArgumentException("Found null entry in jvmArgs");
|
||||
}
|
||||
for(String s : clientArgs)
|
||||
{
|
||||
if(s == null) throw new IllegalArgumentException("Found null entry in clientArgs");
|
||||
}
|
||||
for(OptionalFile f : updateOptional)
|
||||
{
|
||||
if(f == null) throw new IllegalArgumentException("Found null entry in updateOptional");
|
||||
if(f.name == null) throw new IllegalArgumentException("Optional: name must not be null");
|
||||
if(f.list == null) throw new IllegalArgumentException("Optional: list must not be null");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue