From e80bb3190ad76cfa281f0a4392a8d138ca4b82ac Mon Sep 17 00:00:00 2001 From: Chicken-Bones Date: Wed, 19 Feb 2014 19:16:43 +1000 Subject: [PATCH] Add early guard and more detailed error message for methods not matching scala signatures. --- codechicken/multipart/asm/ASMMixinCompiler.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/codechicken/multipart/asm/ASMMixinCompiler.scala b/codechicken/multipart/asm/ASMMixinCompiler.scala index dd52c28..20a1e7c 100644 --- a/codechicken/multipart/asm/ASMMixinCompiler.scala +++ b/codechicken/multipart/asm/ASMMixinCompiler.scala @@ -603,7 +603,11 @@ object ASMMixinCompiler } else if(!sym.name.equals("$init$") && !sym.isPrivate) { - methods+=findMethod(new ObfMapping(cnode.name, sym.name, desc), cnode) + val map = new ObfMapping(cnode.name, sym.name, desc) + val method = findMethod(map, cnode) + if(method == null) + throw new RuntimeException("Unable to add multipart trait: "+map+" found in scala signature but not in class file. Most likely an obfuscation issue.") + methods+=method } } else