diff --git a/src/main/java/org/spongepowered/asm/mixin/injection/invoke/InvokeInjector.java b/src/main/java/org/spongepowered/asm/mixin/injection/invoke/InvokeInjector.java index d6f2ea1d..7dc20ba6 100644 --- a/src/main/java/org/spongepowered/asm/mixin/injection/invoke/InvokeInjector.java +++ b/src/main/java/org/spongepowered/asm/mixin/injection/invoke/InvokeInjector.java @@ -86,8 +86,8 @@ public abstract class InvokeInjector extends Injector { @Override protected void inject(Target target, AbstractInsnNode node) { if (!(node instanceof MethodInsnNode)) { - throw new InvalidInjectionException(this.info, this.annotationType + " annotation is targetting a non-method insn in " + target - + " in " + this.classNode.name); + throw new InvalidInjectionException(this.info, this.annotationType + " annotation on is targetting a non-method insn in " + target + + " in " + this.classNode.name + "/" + this.methodNode.name); } this.inject(target, (MethodInsnNode)node); diff --git a/src/main/java/org/spongepowered/asm/mixin/injection/invoke/ModifyArgInjector.java b/src/main/java/org/spongepowered/asm/mixin/injection/invoke/ModifyArgInjector.java index 5a9de998..f76c33b3 100644 --- a/src/main/java/org/spongepowered/asm/mixin/injection/invoke/ModifyArgInjector.java +++ b/src/main/java/org/spongepowered/asm/mixin/injection/invoke/ModifyArgInjector.java @@ -76,7 +76,7 @@ public class ModifyArgInjector extends InvokeInjector { if (this.singleArgMode) { if (!this.methodArgs[0].equals(this.returnType)) { - throw new InvalidInjectionException(this.info, "@ModifyArg return type must match the parameter type." + throw new InvalidInjectionException(this.info, "@ModifyArg return type on " + this.methodNode.name + " must match the parameter type." + " ARG=" + this.methodArgs[0] + " RETURN=" + this.returnType); } } @@ -118,8 +118,8 @@ public class ModifyArgInjector extends InvokeInjector { */ private int injectMultiArgHandler(Target target, Type[] args, int argIndex, InsnList insns) { if (!Arrays.equals(args, this.methodArgs)) { - throw new InvalidInjectionException(this.info, "@ModifyArg method targets a method with an invalid signature " - + Injector.printArgs(args) + ", expected " + Injector.printArgs(this.methodArgs)); + throw new InvalidInjectionException(this.info, "@ModifyArg method " + this.methodNode.name + " targets a method with an invalid" + + " signature " + Injector.printArgs(args) + ", expected " + Injector.printArgs(this.methodArgs)); } int[] argMap = this.storeArgs(target, args, insns, 0); @@ -133,7 +133,7 @@ public class ModifyArgInjector extends InvokeInjector { if (this.index > -1) { if (this.index >= args.length || !args[this.index].equals(this.returnType)) { throw new InvalidInjectionException(this.info, "Specified index " + this.index + " for @ModifyArg is invalid for args " - + Injector.printArgs(args) + ", expected " + this.returnType); + + Injector.printArgs(args) + ", expected " + this.returnType + " on " + this.methodNode.name); } return this.index; } @@ -147,7 +147,7 @@ public class ModifyArgInjector extends InvokeInjector { if (argIndex != -1) { throw new InvalidInjectionException(this.info, "Found duplicate args with index [" + argIndex + ", " + arg + "] matching type " - + this.returnType + " for @ModifyArg target " + target + " in " + this.classNode.name + + this.returnType + " for @ModifyArg target " + target + " in " + this.classNode.name + "/" + this.methodNode.name + ". Please specify index of desired arg."); } @@ -156,7 +156,7 @@ public class ModifyArgInjector extends InvokeInjector { if (argIndex == -1) { throw new InvalidInjectionException(this.info, "Could not find arg matching type " + this.returnType + " for @ModifyArg target " - + target + " in " + this.classNode.name); + + target + " in " + this.classNode.name + "/" + this.methodNode.name); } return argIndex; diff --git a/src/main/java/org/spongepowered/asm/mixin/injection/invoke/RedirectInjector.java b/src/main/java/org/spongepowered/asm/mixin/injection/invoke/RedirectInjector.java index f17302db..91ec7da1 100644 --- a/src/main/java/org/spongepowered/asm/mixin/injection/invoke/RedirectInjector.java +++ b/src/main/java/org/spongepowered/asm/mixin/injection/invoke/RedirectInjector.java @@ -90,7 +90,7 @@ public class RedirectInjector extends InvokeInjector { if (alternateDesc.equals(this.methodNode.desc)) { injectTargetParams = true; } else { - throw new InvalidInjectionException(this.info, "@Redirect handler method has an invalid signature " + throw new InvalidInjectionException(this.info, "@Redirect handler method " + this.methodNode.name + " has an invalid signature " + ", expected " + desc + " found " + this.methodNode.desc); } }