Skip to content

Commit 9746165

Browse files
committed
[Fix] Bug report fixes.
[Fix] If an exception occured while building the server info data, the footer was not logged. [Fix] Uncommented the ServerInfo() call that was commented out by mistake in a previous commit.
1 parent 5e905ce commit 9746165

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Win32_Interop/Win32_StackTrace.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ void BugReportEnd(){
169169

170170
LONG WINAPI UnhandledExceptiontHandler(PEXCEPTION_POINTERS info) {
171171
if (!processingException) {
172+
bool headerLogged = false;
172173
try {
173174
const char* exDescription = "Exception code not available";
174175
processingException = true;
@@ -178,13 +179,16 @@ LONG WINAPI UnhandledExceptiontHandler(PEXCEPTION_POINTERS info) {
178179

179180
// Call antirez routine to log the start of the bug report
180181
bugReportStart();
182+
headerLogged = true;
181183
redisLog(REDIS_WARNING, "--- %s", exDescription);
182184
StackTraceInfo();
183-
//ServerInfo();
185+
ServerInfo();
186+
}
187+
catch (...) {}
188+
if (headerLogged) {
184189
BugReportEnd();
185-
processingException = false;
186190
}
187-
catch (...) {};
191+
processingException = false;
188192
}
189193

190194
if (defaultTopLevelExceptionHandler != NULL) {

0 commit comments

Comments
 (0)