mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +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();
|
||||
|
|
|
@ -44,9 +44,9 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep
|
|||
if (!process.isAlive()) {
|
||||
int errorcode = process.exitValue();
|
||||
if (errorcode != 0)
|
||||
LogHelper.error("Process exitwith error code: %d", errorcode);
|
||||
LogHelper.error("Process exit with error code: %d", errorcode);
|
||||
else
|
||||
LogHelper.info("Process exitwith code 0");
|
||||
LogHelper.info("Process exit with code 0");
|
||||
} else {
|
||||
LogHelper.debug("Process started success");
|
||||
}
|
||||
|
|
|
@ -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