From 9de2f9a5a0a94a7473fca7bdb54aca4e715be719 Mon Sep 17 00:00:00 2001 From: Craig Macdonald Date: Tue, 20 Oct 2020 18:48:37 +0100 Subject: [PATCH] Improve error message on method not found --- jnius/jnius_export_class.pxi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jnius/jnius_export_class.pxi b/jnius/jnius_export_class.pxi index 31e7f720..904f7f10 100644 --- a/jnius/jnius_export_class.pxi +++ b/jnius/jnius_export_class.pxi @@ -1140,7 +1140,10 @@ cdef class JavaMultipleMethod(object): if not scores: raise JavaException( - 'No methods matching your arguments, requested: {}, available: {}'.format( + 'No {}methods called {} in {} matching your arguments, requested: {}, available: {}'.format( + '' if self.j_self else 'static ', + self.name.decode("utf-8"), + self.classname.decode("utf-8"), args, found_signatures )