- Notifications
You must be signed in to change notification settings - Fork748
Better error messages for method argument mismatch and others#1361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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.Enum
Any 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.
AUTHORS
CHANGELOG