| 8481 | } |
| 8482 | |
| 8483 | FatalConditionHandler::FatalConditionHandler() { |
| 8484 | isSet = true; |
| 8485 | // 32k seems enough for Catch to handle stack overflow, |
| 8486 | // but the value was found experimentally, so there is no strong guarantee |
| 8487 | guaranteeSize = 32 * 1024; |
| 8488 | exceptionHandlerHandle = nullptr; |
| 8489 | // Register as first handler in current chain |
| 8490 | exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException); |
| 8491 | // Pass in guarantee size to be filled |
| 8492 | SetThreadStackGuarantee(&guaranteeSize); |
| 8493 | } |
| 8494 | |
| 8495 | void FatalConditionHandler::reset() { |
| 8496 | if (isSet) { |