Skip to content

Commit

Permalink
fix #5531: don't throw in C-Interface
Browse files Browse the repository at this point in the history
  • Loading branch information
abma committed May 11, 2017
1 parent 51a9698 commit 70d22ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion AI/Skirmish/RAI/LogFile.cpp
Expand Up @@ -16,7 +16,9 @@ cLogFile::cLogFile(IAICallback* cb, string sFilename, bool bAppend)
string sFilename_w;
const bool located = cRAI::LocateFile(cb, sFilename, sFilename_w, true);
if (!located) {
throw 11;
logFile = stderr;
fprintf(logFile, "RAI: Couldn't locate %s\n", sFilename.c_str());
return;
}

if( bAppend )
Expand All @@ -36,6 +38,8 @@ cLogFile::cLogFile(IAICallback* cb, string sFilename, bool bAppend)

cLogFile::~cLogFile()
{
if (logFile == stderr)
return;
fclose(logFile);
// logFile->close();
// delete logFile;
Expand Down

0 comments on commit 70d22ce

Please sign in to comment.