Actually parse the i18n exception message into the super constructor,
so the exception has a useful text message, even in crash logs and on the server. Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
parent
cdbd842494
commit
aa7380acc6
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,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(ForgeI18n.getPattern(i18nMessage), originalException);
|
super(ForgeI18n.parseMessage(i18nMessage, 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 a new issue