improve error message for constructor not matching arguments

This commit is contained in:
Jim 2020-10-22 16:10:11 -04:00
parent 653f8728d2
commit eab00790bc
1 changed files with 4 additions and 2 deletions

View File

@ -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]