FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fixup! Disable implicit conversions, that might lose information: · losttech/pythonnet@dd41fcc · GitHub

Commit dd41fcc

Browse files
committed
fixup! Disable implicit conversions, that might lose information:
fixes for pythonnet#1568
1 parent 1ca0bdb commit dd41fcc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎src/runtime/converter.cs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,12 @@ internal static bool ToManagedValue(IntPtr value, Type obType,
361361
}
362362
result = cb.type.Value;
363363
return true;
364+
365+
case null:
366+
break;
367+
368+
default:
369+
throw new ArgumentException("We should never receive instances of other managed types");
364370
}
365371

366372
if (value == Runtime.PyNone && !obType.IsValueType)
@@ -513,7 +519,7 @@ internal static bool ToManagedValue(IntPtr value, Type obType,
513519
{
514520
if (setError)
515521
{
516-
Exceptions.SetError(ex.InnerException);
522+
Exceptions.SetError(ex);
517523
}
518524
return null;
519525
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL