forked from 0ad/0ad
again hooked up 0ad exception handler (pending cleanup of the exception code)
This was SVN commit r1852.
This commit is contained in:
parent
60dbb779eb
commit
4c6713b582
@ -1293,18 +1293,21 @@ static long CALLBACK except_filter(EXCEPTION_POINTERS* except)
|
||||
}
|
||||
|
||||
|
||||
#ifndef EXCEPTION_HACK_0AD
|
||||
|
||||
static void set_exception_handler()
|
||||
{
|
||||
prev_except_filter = SetUnhandledExceptionFilter(except_filter);
|
||||
prev_except_filter = SetUnhandledExceptionFilter(exception_filter);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
LONG WINAPI debug_main_exception_filter(PEXCEPTION_POINTERS ep);
|
||||
|
||||
|
||||
#ifdef EXCEPTION_HACK_0AD
|
||||
|
||||
|
||||
|
||||
static void set_exception_handler()
|
||||
{
|
||||
prev_except_filter = SetUnhandledExceptionFilter(debug_main_exception_filter);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1443,7 +1446,14 @@ static int write_crashlog(const char* file, const wchar_t* header, CONTEXT* cont
|
||||
// the crash log more useful, and takes the responsibility of
|
||||
// suiciding away from main.cpp.
|
||||
|
||||
int debug_main_exception_filter(unsigned int UNUSEDPARAM(code), PEXCEPTION_POINTERS ep)
|
||||
/*
|
||||
TODO
|
||||
If the process is not being debugged, the function displays an Application Error message box, depending on the current error mode. The default behavior is to display the dialog box, but this can be disabled by specifying SEM_NOGPFAULTERRORBOX in a call to the SetErrorMode function.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
LONG WINAPI debug_main_exception_filter(PEXCEPTION_POINTERS ep)
|
||||
{
|
||||
// If something crashes after we've already crashed (i.e. when shutting
|
||||
// down everything), don't bother logging it, because the first crash
|
||||
|
@ -30,13 +30,6 @@ extern "C" {
|
||||
# error "port this or define to implementation function"
|
||||
#endif
|
||||
|
||||
|
||||
// TODO: remove this from here, and make all the exception debugging stuff nicer
|
||||
struct _EXCEPTION_POINTERS;
|
||||
typedef struct _EXCEPTION_POINTERS* PEXCEPTION_POINTERS;
|
||||
extern int debug_main_exception_filter(unsigned int code, PEXCEPTION_POINTERS ep);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user