| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ement decoding attempt
Codecov Report
@@ Coverage Diff @@
## master #1083 +/- ##
=======================================
Coverage 86.75% 86.75%
=======================================
Files 1 1
Lines 302 302
=======================================
Hits 262 262
Misses 40 40
Continue to review full report at Codecov.
|
Sorry, something went wrong.
…ement decoding attempt (pythonnet#1083)
| Back | FazBrowse Home | New Git URL |
What does this implement/fix? Explain your changes.
When TupleCodec.TryDecode is trying to decode a tuple from Python to .NET, and the element type in Python does not match one in .NET, Converter.ToManaged on that element will fail and leave PyErr set. That caused it to be picked up later by a random check for PyErr and raised as .NET exception in unexpected places.
This change clears PyErr in TryDecode if decoding of an element fails, thus allowing other codecs/overloads to be probed safely.