Title: Better error messages for method argument mismatch and others by tminka · Pull Request #1361 · pythonnet/pythonnet · GitHub
Open Graph Title: Better error messages for method argument mismatch and others by tminka · Pull Request #1361 · pythonnet/pythonnet
X Title: Better error messages for method argument mismatch and others by tminka · Pull Request #1361 · pythonnet/pythonnet
Description: 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: Converter.ToManaged is fixed to obey setError consistently Converter.ToArray catches exceptions RaiseTypeError appends any existing error message Fixed missing information on 'No method matches given arguments' by adding the method name. 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. Make sure to include one or more tests for your change If an enhancement PR, please create docs and at best an example Add yourself to AUTHORS Updated the CHANGELOG
Open Graph Description: 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 o...
X Description: 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 o...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/1361
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:166c44d6-e0b9-3cf1-e15a-8d39cee04c4d |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | CB28:1F049A:177472E:20DFA9F:6970D771 |
| html-safe-nonce | 514f1c76bc582d46f97ea09b39926cf324097733058a61ba3f9b9cd72060dfeb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjI4OjFGMDQ5QToxNzc0NzJFOjIwREZBOUY6Njk3MEQ3NzEiLCJ2aXNpdG9yX2lkIjoiMjEyNjczNjA4MDEwMTIzNDU0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 49c7f8de76091a057803fa0454d51706776d85d8652b6286efde8f8480428d9d |
| hovercard-subject-tag | pull_request:559249120 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/pythonnet/pythonnet/pull/1361/checks |
| twitter:image | https://avatars.githubusercontent.com/u/8955276?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/8955276?s=400&v=4 |
| og:image:alt | 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 o... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9203e7efc62065329c3b7015a1e6d16fc14bce440abec7b0d3cbe9e4fb1e2e4 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | eb3c92b74ae48a78cffd8700b8eb5f60bad61528 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width