use of org.spongepowered.asm.mixin.transformer.throwables.MixinTargetAlreadyLoadedException in project SpongeForge by SpongePowered.
the class MixinErrorHandler method getPrettyPrinter.
public PrettyPrinter getPrettyPrinter(Throwable th) {
if (th.getCause() instanceof ConstraintViolationException) {
ConstraintViolationException ex = (ConstraintViolationException) th.getCause();
Constraint constraint = ex.getConstraint();
if ("FORGE".equals(constraint.getToken())) {
return this.forgeVersionNotValid(constraint);
}
return this.patchConstraintFailed(constraint, ex);
} else if (th instanceof MixinTargetAlreadyLoadedException) {
return this.badCoreMod((MixinTargetAlreadyLoadedException) th);
}
return this.itsAllGoneHorriblyWrong();
}
use of org.spongepowered.asm.mixin.transformer.throwables.MixinTargetAlreadyLoadedException in project SpongeForge by SpongePowered.
the class MixinErrorHandler method onPrepareError.
@Override
public ErrorAction onPrepareError(IMixinConfig config, Throwable th, IMixinInfo mixin, ErrorAction action) {
if (action == ErrorAction.ERROR && mixin.getConfig().getMixinPackage().startsWith("org.spongepowered.")) {
PrettyPrinter errorPrinter = this.getPrettyPrinter(th);
String targetClassName = "N/A";
if (th instanceof MixinTargetAlreadyLoadedException) {
targetClassName = ((MixinTargetAlreadyLoadedException) th).getTarget();
}
this.appendTechnicalInfo(errorPrinter, targetClassName, th, mixin).log(this.log);
TerminateVM.terminate("net.minecraftforge.fml", -1);
}
return null;
}
Aggregations