From 5e22d4bcb7e71d165bdbe117dd6dcf94e356b5d7 Mon Sep 17 00:00:00 2001 From: Mumfrey Date: Wed, 13 Jan 2016 01:25:01 +0000 Subject: [PATCH] Provide more information in CallbackInjector error messages --- .../asm/mixin/injection/callback/CallbackInjector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/spongepowered/asm/mixin/injection/callback/CallbackInjector.java b/src/main/java/org/spongepowered/asm/mixin/injection/callback/CallbackInjector.java index 5bbb5758..748c85e7 100644 --- a/src/main/java/org/spongepowered/asm/mixin/injection/callback/CallbackInjector.java +++ b/src/main/java/org/spongepowered/asm/mixin/injection/callback/CallbackInjector.java @@ -408,7 +408,7 @@ public class CallbackInjector extends Injector { if (callback.checkDescriptor(returnableSig)) { // Switching out CallbackInfo for CallbackInfoReturnable // worked, so notify the user that they done derped - throw new InvalidInjectionException(this.info, "Invalid descriptor on callback: CallbackInfoReturnable is required!"); + throw new InvalidInjectionException(this.info, "Invalid descriptor on " + this.info + "! CallbackInfoReturnable is required!"); } MethodNode surrogateHandler = ASMHelper.findMethod(this.classNode, this.methodNode.name, callback.getDescriptor()); @@ -416,7 +416,7 @@ public class CallbackInjector extends Injector { // Found a matching surrogate method, use it callbackMethod = surrogateHandler; } else { - throw new InvalidInjectionException(this.info, "Invalid descriptor on callback: expected " + callback.getDescriptor() + throw new InvalidInjectionException(this.info, "Invalid descriptor on " + this.info + "! Expected " + callback.getDescriptor() + " but found " + this.methodNode.desc); } }