mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] MainClass error handling
This commit is contained in:
parent
1bbaadc5f1
commit
d50c306e80
1 changed files with 5 additions and 4 deletions
|
@ -34,10 +34,7 @@
|
|||
import java.lang.invoke.MethodHandle;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.MethodType;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.net.URL;
|
||||
import java.net.*;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.SimpleFileVisitor;
|
||||
|
@ -302,6 +299,10 @@ private static void launch(ClientProfile profile, Params params) throws Throwabl
|
|||
// Invoke main method
|
||||
try {
|
||||
mainMethod.invokeWithArguments((Object) args.toArray(new String[0]));
|
||||
LogHelper.debug("Main exit successful");
|
||||
} catch (Throwable e) {
|
||||
LogHelper.error(e);
|
||||
throw e;
|
||||
} finally {
|
||||
LauncherEngine.exitLauncher(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue