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:
parent
e1cdb2e558
commit
37a896fe1b
|
@ -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.
|
// 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()
|
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
|
try
|
||||||
{
|
{
|
||||||
Field nameField = ThreadNameCachingStrategy.class.getDeclaredField("THREADLOCAL_NAME");
|
Field nameField = ThreadNameCachingStrategy.class.getDeclaredField("THREADLOCAL_NAME");
|
||||||
|
|
|
@ -25,6 +25,7 @@ import net.minecraftforge.fml.loading.EarlyLoadingException;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +53,7 @@ public class ModLoadingException extends RuntimeException
|
||||||
private final List<Object> context;
|
private final List<Object> context;
|
||||||
|
|
||||||
public ModLoadingException(final IModInfo modInfo, final ModLoadingStage errorStage, final String i18nMessage, final Throwable originalException, 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.modInfo = modInfo;
|
||||||
this.errorStage = errorStage;
|
this.errorStage = errorStage;
|
||||||
this.i18nMessage = i18nMessage;
|
this.i18nMessage = i18nMessage;
|
||||||
|
|
Loading…
Reference in New Issue