-
Kevin Modzelewski authored
It was pretty unwieldy and handled some disparate parts of the exception-raising process. I think things are a bit cleaner now: - cxx_unwind.cpp handles C++ unwinding semantics - unwinding.cpp converts C stacks to Python stacks - exceptions.cpp takes Python stack frames and handles them appropriately So for throwing a C++ exception, it starts out in cxx_unwind.cpp, which then hands off the C frames to unwinding.cpp, which then hands off the Python frames to exceptions.cpp. When we get exceptions not via uncaught C++ exceptions (ie explicitly handled C++ exceptions or CAPI exceptions), those go directly into exceptions.cpp. There are also non-exception cases that we want to get the Python stack trace (ex sys._getframe), and those are handled by unwinding.cpp
4b7c277f