private void HaltTestOnError(Exception e, string format, params object[] args)
{
if (Interlocked.CompareExchange(ref m_stopped, 1, 0) == 0)
{
try
{
m_errorEvent.Set();
if (e != null)
{
Log(e, format, args);
}
else
{
Log(format, args);
}
}
catch (Exception)
{
// guard against stray publish reponses during debugging.
}
}
}