mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Fix FMLCommonHandler#exitJava printing useless/wrong calling info (#4742)
This commit is contained in:
1 parent
0b5a6a3b03
commit
7c098462fe
1 file changed
+7
-8
@@ -663,18 +663,17 @@ public class FMLCommonHandler
|
||||
*/
|
||||
public void exitJava(int exitCode, boolean hardExit)
|
||||
{
|
||||
FMLLog.log.info("Java has been asked to exit (code {}) by {}.", exitCode, Thread.currentThread().getStackTrace()[1]);
|
||||
FMLLog.log.warn("Java has been asked to exit (code {})", exitCode);
|
||||
if (hardExit)
|
||||
{
|
||||
FMLLog.log.info("This is an abortive exit and could cause world corruption or other things");
|
||||
FMLLog.log.warn("This is an abortive exit and could cause world corruption or other things");
|
||||
}
|
||||
if (Boolean.parseBoolean(System.getProperty("fml.debugExit", "false")))
|
||||
StackTraceElement[] stack = Thread.currentThread().getStackTrace();
|
||||
FMLLog.log.warn("Exit trace:");
|
||||
//The first 2 elements are Thread#getStackTrace and FMLCommonHandler#exitJava and aren't relevant
|
||||
for (int i = 2; i < stack.length; i++)
|
||||
{
|
||||
FMLLog.log.info("Exit trace", new Throwable());
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.log.info("If this was an unexpected exit, use -Dfml.debugExit=true as a JVM argument to find out where it was called");
|
||||
FMLLog.log.warn("\t{}", stack[i]);
|
||||
}
|
||||
if (hardExit)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user