Better error messages from PyObject.AsManagedObject and DelegateManager.TrueDispatch by tminka · Pull Request #1344 · pythonnet/pythonnet

What does this implement/fix? Explain your changes.

When Converter.ToManaged is called in a context where it must succeed, we can get a more precise error message by calling it with setError=true. This PR makes that change in two places.

Does this close any currently open issues?

No

Any other comments?

There are a few other places where a similar change could be made.

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