Skip to content

Commit

Permalink
Fixed bug in error limit
Browse files Browse the repository at this point in the history
  • Loading branch information
mpflanzer committed Feb 13, 2016
1 parent 3baa623 commit cd136ba
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/plugins/Logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,19 @@ void Logger::log(MessageType type, const char *message)
<< m_numErrors << " errors generated - suppressing further errors"
<< endl << endl;
}
if (m_numErrors == m_stopErrors)
{
*m_log << endl << "Oclgrind: "
<< "Error limit reached - aborting execution"
<< endl << endl;
exit(1);
}
if (m_numErrors++ >= m_maxErrors)
return;
}

*m_log << endl << message << endl;

if (m_numErrors == m_stopErrors)
{
*m_log << endl << "Oclgrind: "
<< "Error limit reached - aborting execution"
<< endl << endl;
exit(1);
}
}

bool Logger::hasDiagnosticOption(MessageType optType)
Expand Down

0 comments on commit cd136ba

Please sign in to comment.