Chain import SystemError on unexpected exceptions · Issue #99947 · python/cpython (original) (raw)

Feature or enhancement

For functions, the SystemError chains an in-fly unexpected exceptions, for some import errors this is not the case.

Pitch

Chaining seems easy, and helps debugging since it is tricky to get back the original exception otherwise, and knowing the exception is often sufficient.

Linked PRs