SIGN IN SIGN UP

Propagate exceptions from TryGetMember in tp_getattro_dlr_proxy (#2718)

The dynamic getter swallowed any exception from TryGetMember and
returned default to Python with the prior AttributeError still set,
so user code observed a misleading AttributeError instead of the real
failure.

Set a Python exception in the catch arm. We use RuntimeError with the
message string rather than Converter.ToPython(e) because wrapping the
CLR exception object can trigger type initialisation that re-enters
this same slot on the live dynamic object, producing infinite
recursion.

Mirrors the symmetry already present in the setter (#2706 review,
@lostmsu) and adds a regression test alongside the existing
ThrowingSetDynamicObject coverage.
G
greateggsgreg committed
8b12b56d13e398feea20a7ed68ee2872a17b730f
Parent: 2408c43
Committed by Benedikt Reinartz <filmor@gmail.com> on 5/15/2026, 7:57:36 PM