From 2a927cd0b8d60d9e487ad90b45154680c27b7b67 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 11 Jan 2013 22:00:10 +0000 Subject: [PATCH] - try to improve error handling on windows for better stack traces --- source/shared_lib/include/platform/sdl/platform_util.h | 6 ++++++ source/shared_lib/sources/platform/win32/platform_util.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/shared_lib/include/platform/sdl/platform_util.h b/source/shared_lib/include/platform/sdl/platform_util.h index 5804d9e4e..147447501 100644 --- a/source/shared_lib/include/platform/sdl/platform_util.h +++ b/source/shared_lib/include/platform/sdl/platform_util.h @@ -51,6 +51,9 @@ public: virtual ~PlatformExceptionHandler() {} void install(string dumpFileName) {} virtual void handle()=0; +#if defined(__WIN32__) && !defined(__GNUC__) + virtual void handle(LPEXCEPTION_POINTERS pointers)=0; +#endif }; // ===================================================== @@ -84,6 +87,9 @@ public: void install(string dumpFileName); virtual void handle()=0; +#if !defined(__GNUC__) + virtual void handle(LPEXCEPTION_POINTERS pointers)=0; +#endif static string codeToStr(DWORD code); }; diff --git a/source/shared_lib/sources/platform/win32/platform_util.cpp b/source/shared_lib/sources/platform/win32/platform_util.cpp index 0a1ff6940..bc986d660 100644 --- a/source/shared_lib/sources/platform/win32/platform_util.cpp +++ b/source/shared_lib/sources/platform/win32/platform_util.cpp @@ -138,7 +138,7 @@ LONG WINAPI PlatformExceptionHandler::handler(LPEXCEPTION_POINTERS pointers){ //printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); - thisPointer->handle(); + thisPointer->handle(pointers); #endif //printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);