mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-19 19:59:34 +00:00
Provide more information in CallbackInjector error messages
This commit is contained in:
1 parent
3b2783c214
commit
5e22d4bcb7
1 file changed
+2
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user