| 63 | } |
| 64 | |
| 65 | bool is_processing_rethrow(PEXCEPTION_RECORD p) noexcept { |
| 66 | // Processing flow: |
| 67 | // 0. throw; |
| 68 | // 1. _CxxThrowException(pExceptionObject = nullptr) |
| 69 | // 2. VEH & SEH (may throw new c++ exceptions!) |
| 70 | // 3. __RethrowException(_pCurrentException) |
| 71 | // 4. VEH |
| 72 | if (PER_PEXCEPTOBJ(p) == 0) return true; |
| 73 | PEXCEPTION_RECORD current_cxx_exception = _pCurrentException; |
| 74 | if (current_cxx_exception == nullptr) return false; |
| 75 | return PER_PEXCEPTOBJ(p) == PER_PEXCEPTOBJ(current_cxx_exception); |
| 76 | } |
| 77 | |
| 78 | LONG NTAPI veh(PEXCEPTION_POINTERS p) { |
| 79 | if (data.capture_stacktraces_at_throw && |