self.check_error(code, line_number, fatal_error, **kw)
def check_windows_exception(self, code, line_number, name_regex, **kw):
- fatal_error = 'Windows exception: %s' % name_regex
+ fatal_error = 'Windows fatal exception: %s' % name_regex
self.check_error(code, line_number, fatal_error, **kw)
@unittest.skipIf(sys.platform.startswith('aix'),
{
const int fd = fatal_error.fd;
DWORD code = exc_info->ExceptionRecord->ExceptionCode;
+ DWORD flags = exc_info->ExceptionRecord->ExceptionFlags;
- PUTS(fd, "Windows exception: ");
+ /* only log fatal exceptions */
+ if (flags & EXCEPTION_NONCONTINUABLE) {
+ /* call the next exception handler */
+ return EXCEPTION_CONTINUE_SEARCH;
+ }
+
+ PUTS(fd, "Windows fatal exception: ");
switch (code)
{
/* only format most common errors */
case EXCEPTION_IN_PAGE_ERROR: PUTS(fd, "page error"); break;
case EXCEPTION_STACK_OVERFLOW: PUTS(fd, "stack overflow"); break;
default:
- PUTS(fd, "code 0x");
- _Py_DumpHexadecimal(fd, code, sizeof(DWORD));
+ PUTS(fd, "code ");
+ _Py_DumpDecimal(fd, code, sizeof(DWORD));
}
PUTS(fd, "\n\n");