[FIX] Дополнительные проверки для более понятной ошибки

This commit is contained in:
Gravit 2019-03-10 19:01:14 +07:00
parent be4c2f4b07
commit 84e5f91fdf
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
4 changed files with 26 additions and 4 deletions

View file

@ -165,6 +165,10 @@ public void verify() {
if (env == null) { if (env == null) {
throw new NullPointerException("Env must not be null"); throw new NullPointerException("Env must not be null");
} }
if(netty == null)
{
throw new NullPointerException("Netty must not be null");
}
} }
} }

View file

@ -89,9 +89,9 @@ public synchronized Connection getConnection() throws SQLException {
// Set HikariCP pool // Set HikariCP pool
// Replace source with hds // Replace source with hds
source = new HikariDataSource(cfg); source = new HikariDataSource(cfg);
LogHelper.info("HikariCP pooling enabled for '%s'", poolName); LogHelper.warning("HikariCP pooling enabled for '%s'", poolName);
} catch (ClassNotFoundException ignored) { } 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(); return source.getConnection();

View file

@ -391,6 +391,24 @@ public void verify() {
// Client launcher // Client launcher
VerifyHelper.verify(getTitle(), VerifyHelper.NOT_EMPTY, "Main class can't be empty"); 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 @Override