From dd41fccba6387148b9a5d044adbe840dd400f53a Mon Sep 17 00:00:00 2001 From: Victor Nova Date: Mon, 27 Sep 2021 15:53:20 -0700 Subject: [PATCH] fixup! Disable implicit conversions, that might lose information: fixes for https://github.com/pythonnet/pythonnet/pull/1568 --- src/runtime/converter.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/runtime/converter.cs b/src/runtime/converter.cs index 6bcf3fb59..ba04933f7 100644 --- a/src/runtime/converter.cs +++ b/src/runtime/converter.cs @@ -361,6 +361,12 @@ internal static bool ToManagedValue(IntPtr value, Type obType, } result = cb.type.Value; return true; + + case null: + break; + + default: + throw new ArgumentException("We should never receive instances of other managed types"); } if (value == Runtime.PyNone && !obType.IsValueType) @@ -513,7 +519,7 @@ internal static bool ToManagedValue(IntPtr value, Type obType, { if (setError) { - Exceptions.SetError(ex.InnerException); + Exceptions.SetError(ex); } return null; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy