Opc.Ua.ServerTest.SubscribeTest.HaltTestOnError C# (CSharp) Method

HaltTestOnError() private method

Halts the test after an error occurred.
private HaltTestOnError ( Exception e, string format ) : void
e System.Exception
format string
return void
        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.
                }
            }
        }