Skip to content

Commit 183c61c

Browse files
authored
Merge pull request #4 from Grabsky/feat/no-matching-method [ci-skip]
improve "no matching method" errors
2 parents 6340eb8 + ab76f36 commit 183c61c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

luajava/src/main/java/party/iroiro/luajava/JuaAPI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ public static int methodInvoke(int index, Class<?> clazz, @Nullable Object obj,
698698
}
699699
Method method = matchMethod(L, methods, METHOD_WRAPPER, objects);
700700
if (method == null) {
701-
L.push("no matching method found");
701+
L.push("no matching method found: " + clazz.getSimpleName() + "#" + name);
702702
return -1;
703703
} else {
704704
return methodInvoke(L, method, obj, objects);
@@ -745,7 +745,7 @@ public static int methodInvoke(int index, Class<?> clazz, @Nullable Object obj,
745745
}
746746
}
747747
}
748-
L.push("no matching method found");
748+
L.push("no method with matching signature found: " + clazz.getSimpleName() + "#" + name + "(" + notSignature + ")");
749749
return -1;
750750
}
751751

0 commit comments

Comments
 (0)