From dd627743dd98e10523f981706cd944d3a7159eb7 Mon Sep 17 00:00:00 2001 From: Dwight Date: Tue, 28 Jun 2011 16:22:25 -0400 Subject: crlf --- db/db.cpp | 78 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'db/db.cpp') diff --git a/db/db.cpp b/db/db.cpp index 95085499e7f..5f4639c9605 100644 --- a/db/db.cpp +++ b/db/db.cpp @@ -1178,49 +1178,49 @@ namespace mongo { LPTOP_LEVEL_EXCEPTION_FILTER filtLast = 0; ::HANDLE standardOut = GetStdHandle(STD_OUTPUT_HANDLE); - LONG WINAPI exceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo) { - { - // given the severity of the event we write to console in addition to the --logFile - // (rawOut writes to the logfile, if a special one were specified) - DWORD written; - WriteFile(standardOut, "unhandled windows exception\n", 20, &written, 0); - FlushFileBuffers(standardOut); - } - - DWORD ec = ExceptionInfo->ExceptionRecord->ExceptionCode; - if( ec == EXCEPTION_ACCESS_VIOLATION ) { - rawOut("access violation"); - } - else { - rawOut("unhandled windows exception"); - char buf[64]; - strcpy(buf, "ec=0x"); - _ui64toa(ec, buf+5, 16); - rawOut(buf); - } - if( filtLast ) - return filtLast(ExceptionInfo); - return EXCEPTION_EXECUTE_HANDLER; - } - - // called by mongoAbort() - extern void (*reportEventToSystem)(const char *msg); - void reportEventToSystemImpl(const char *msg) { + LONG WINAPI exceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo) { + { + // given the severity of the event we write to console in addition to the --logFile + // (rawOut writes to the logfile, if a special one were specified) + DWORD written; + WriteFile(standardOut, "unhandled windows exception\n", 20, &written, 0); + FlushFileBuffers(standardOut); + } + + DWORD ec = ExceptionInfo->ExceptionRecord->ExceptionCode; + if( ec == EXCEPTION_ACCESS_VIOLATION ) { + rawOut("access violation"); + } + else { + rawOut("unhandled windows exception"); + char buf[64]; + strcpy(buf, "ec=0x"); + _ui64toa(ec, buf+5, 16); + rawOut(buf); + } + if( filtLast ) + return filtLast(ExceptionInfo); + return EXCEPTION_EXECUTE_HANDLER; + } + + // called by mongoAbort() + extern void (*reportEventToSystem)(const char *msg); + void reportEventToSystemImpl(const char *msg) { static ::HANDLE hEventLog = RegisterEventSource( NULL, TEXT("mongod") ); if( hEventLog ) { std::wstring s = toNativeString(msg); LPCTSTR txt = s.c_str(); - BOOL ok = ReportEvent( - hEventLog, EVENTLOG_ERROR_TYPE, - 0, 0, NULL, - 1, - 0, - &txt, - 0); - wassert(ok); - } - } - + BOOL ok = ReportEvent( + hEventLog, EVENTLOG_ERROR_TYPE, + 0, 0, NULL, + 1, + 0, + &txt, + 0); + wassert(ok); + } + } + void myPurecallHandler() { printStackTrace(); mongoAbort("pure virtual"); -- cgit v1.2.1