- try to improve error handling on windows for better stack traces

This commit is contained in:
Mark Vejvoda
2013-01-11 22:00:10 +00:00
parent 10f4c1ded4
commit 2a927cd0b8
2 changed files with 7 additions and 1 deletions

View File

@@ -51,6 +51,9 @@ public:
virtual ~PlatformExceptionHandler() {} virtual ~PlatformExceptionHandler() {}
void install(string dumpFileName) {} void install(string dumpFileName) {}
virtual void handle()=0; 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); void install(string dumpFileName);
virtual void handle()=0; virtual void handle()=0;
#if !defined(__GNUC__)
virtual void handle(LPEXCEPTION_POINTERS pointers)=0;
#endif
static string codeToStr(DWORD code); static string codeToStr(DWORD code);
}; };

View File

@@ -138,7 +138,7 @@ LONG WINAPI PlatformExceptionHandler::handler(LPEXCEPTION_POINTERS pointers){
//printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); //printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
thisPointer->handle(); thisPointer->handle(pointers);
#endif #endif
//printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); //printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);