From 4750eb0b7e9a40661a1bd28c1411937d5f682e64 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Sun, 19 May 2013 03:28:09 +0100 Subject: [PATCH] Catch more exceptions on Windows. --- extension/extension.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/extension/extension.cpp b/extension/extension.cpp index ee4e95d..d54a6a4 100644 --- a/extension/extension.cpp +++ b/extension/extension.cpp @@ -93,9 +93,16 @@ void OnGameFrame(bool simulating) #elif defined _WINDOWS LONG CALLBACK BreakpadVectoredHandler(_In_ PEXCEPTION_POINTERS ExceptionInfo) { - if (ExceptionInfo->ExceptionRecord->ExceptionCode != EXCEPTION_ACCESS_VIOLATION) + switch (ExceptionInfo->ExceptionRecord->ExceptionCode) { - return EXCEPTION_CONTINUE_SEARCH; + case EXCEPTION_ACCESS_VIOLATION: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_STACK_OVERFLOW: + break; + default: + return EXCEPTION_CONTINUE_SEARCH; } if (handler->WriteMinidumpForException(ExceptionInfo))