Don't display exit code for none fatal info

Display name of path we were trying to open if opening fails

svn path=/trunk/; revision=19255
This commit is contained in:
Ged Murphy
2005-11-15 21:22:00 +00:00
parent 6d93d59f2c
commit b8ef8fda19
2 changed files with 5 additions and 3 deletions

View File

@@ -44,7 +44,10 @@ DWORD WINAPI QotdHandler(VOID* Sock_)
LogEvent(_T("QOTD: Opening quotes file\n"), 0, FALSE);
if ((fp = _tfopen(Sys, "r")) == NULL)
{
LogEvent(_T("QOTD: Error opening quote file\n"), 0, TRUE);
TCHAR temp[512];
_stprintf(temp, _T("QOTD: Error opening quote file : %s\n"), Sys);
LogEvent(temp, 0, TRUE);
LogEvent(_T("QOTD: Terminating thread\n"), 0, FALSE);
ExitThread(-1);
}

View File

@@ -260,8 +260,7 @@ LogEvent (LPCTSTR UserMessage, DWORD ExitCode, BOOL PrintErrorMsg)
}
else
{
_stprintf(MessageBuffer, _T("\n%s ExitCode = %lu."),
UserMessage, ExitCode);
_stprintf(MessageBuffer, _T("\n%s"), UserMessage);
}
fputs (MessageBuffer, hLogFile);