From eab00790bc5109565cc644ad1b6e3235f637e192 Mon Sep 17 00:00:00 2001 From: Jim Date: Thu, 22 Oct 2020 16:10:11 -0400 Subject: [PATCH] improve error message for constructor not matching arguments --- jnius/jnius_export_class.pxi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jnius/jnius_export_class.pxi b/jnius/jnius_export_class.pxi index e4019bc..0e016e2 100644 --- a/jnius/jnius_export_class.pxi +++ b/jnius/jnius_export_class.pxi @@ -338,8 +338,10 @@ cdef class JavaClass(object): ) if not scores: raise JavaException( - 'No constructor matching your arguments, available: ' - '{}'.format(found_definitions) + 'No constructor matching your arguments, requested: {}, available: {}'.format( + args, + found_definitions + ) ) scores.sort() score, definition, d_ret, d_args, args_ = scores[-1]