no message

This commit is contained in:
Chris Danford
2002-02-05 05:33:33 +00:00
parent 49f4997d47
commit 2949721b40
13 changed files with 346 additions and 190 deletions
+11 -9
View File
@@ -66,8 +66,6 @@ bool IsAnInt( CString s )
//-----------------------------------------------------------------------------
void RageLogStart()
{
#if defined(DEBUG) | defined(_DEBUG)
DeleteFile( g_sLogFileName );
DeleteFile( g_sErrorFileName );
@@ -82,8 +80,6 @@ void RageLogStart()
RageLog( "Log starting %.4d-%.2d-%.2d %.2d:%.2d:%.2d",
st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond );
RageLog( "\n" );
#endif
}
@@ -99,7 +95,9 @@ void RageLog( LPCTSTR fmt, ...)
CString sBuff = vssprintf( fmt, va );
sBuff += "\n";
fprintf(g_fileLog, sBuff);
fprintf(g_fileLog, sBuff);
fclose( g_fileLog );
g_fileLog = fopen( g_sLogFileName, "w" );
}
void RageLogHr( HRESULT hr, LPCTSTR fmt, ...)
@@ -408,13 +406,17 @@ VOID DisplayErrorAndDie( CString sError )
}
sError += "\n\n" + fromClipboard;
*/
#ifdef DEBUG // don't use error handler in Release mode
AfxMessageBox( sError );
exit(1);
#else
FILE* fp = fopen( g_sErrorFileName, "w" );
fprintf( fp, sError );
fclose( fp );
exit(1);
// generate an exception so the error handler shows
int d = 0;
int ksg = 3/d;
#endif
}