Add params for the exception message

Signed-off-by: cpw <cpw+github@weeksfamily.ca>

tweak logging

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2019-06-08 14:38:18 -04:00
parent e1cdb2e558
commit 37a896fe1b
No known key found for this signature in database
GPG Key ID: 8EB3DF749553B1B7
2 changed files with 3 additions and 1 deletions

View File

@ -1001,6 +1001,7 @@ public class ForgeHooksClient
// This serves a workaround for no built-in method of triggering this type of refresh as brought up by LOG4J2-2178.
public static void invalidateLog4jThreadCache()
{
if (System.getProperty("java.version").compareTo("1.8.0_102") >= 0) return; // skip for later JDKs, because it's not CACHED see LOG4J2-2052
try
{
Field nameField = ThreadNameCachingStrategy.class.getDeclaredField("THREADLOCAL_NAME");

View File

@ -25,6 +25,7 @@ import net.minecraftforge.fml.loading.EarlyLoadingException;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
@ -52,7 +53,7 @@ public class ModLoadingException extends RuntimeException
private final List<Object> context;
public ModLoadingException(final IModInfo modInfo, final ModLoadingStage errorStage, final String i18nMessage, final Throwable originalException, Object... context) {
super("Mod Loading Exception : "+i18nMessage, originalException);
super("Mod Loading Exception : " + i18nMessage + " " + Arrays.toString(Streams.concat(Stream.of(modInfo, errorStage, originalException), Stream.of(context)).toArray()), originalException);
this.modInfo = modInfo;
this.errorStage = errorStage;
this.i18nMessage = i18nMessage;