- Notifications
You must be signed in to change notification settings - Fork771
Better error messages for method argument mismatch and others#1361
Better error messages for method argument mismatch and others#1361lostmsu merged 5 commits intopythonnet:masterfrom
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
… value conversion, and other problemsConverter.ToManaged obeys setError consistentlyPyObject_Hash and tp_hash return nintMakeGenericType and MakeGenericMethod have try/catchRaiseTypeError sets __cause__ instead of changing the message string
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
AggregateExceptions print better from PythonFor an overloaded method, MethodBinder.Bind collects all binding errors
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
…eption.Message(for justification seehttps://stackoverflow.com/questions/2176707/exception-message-vs-exception-tostring )Binding failures always have AggregateException as the cause, with PythonExceptions as the inner.inner exceptions.
What does this implement/fix? Explain your changes.
This change produces more specific error messages by passing setError=true to Converter.ToManaged whenever possible, such as when there is only one method in methodbinder. To support this:
Does this close any currently open issues?
No, but it provides more information to the user when they come across issues like#1099 . Instead of "No method matches" or "No match found" it now says
TypeError : 'int' value cannot be converted to System.EnumAny other comments?
I added some failing test cases to test_array.py that should be addressed by a future PR.
Checklist
Check all those that are applicable and complete.
AUTHORSCHANGELOG