Exemplo n.º 1
0
        /// <summary>
        /// Fires an instrumentation event.
        /// </summary>
        /// <param name="name">The name of the exception policy.</param>
        /// <param name="e">The caught exception.</param>
        protected override void PublishFailureEvent(string name, Exception e)
        {
            string message = CreateProviderNotFoundExceptionMessage(currentException, name);

            ExceptionHandlingConfigFailureEvent.Fire(message);
            ExceptionUtility.LogHandlingException(name, e, null, currentException);
        }
Exemplo n.º 2
0
        public void ExceptionHandlingConfigFailureEventTestWithException()
        {
            ExceptionHandlingConfigFailureEvent.Fire("test", new Exception("test exception"));

            Assert.AreEqual(1, log.Entries.Count - startCount);

            string expected = "test Exception: System.Exception: test exception";
            string actual   = log.Entries[log.Entries.Count - 1].Message;

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void ExceptionHandlingConfigFailureEventTest()
        {
            ExceptionHandlingConfigFailureEvent.Fire("test");

            Assert.AreEqual(1, log.Entries.Count - startCount);

            string expected = "test";
            string actual   = log.Entries[log.Entries.Count - 1].Message;

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 4
0
 private void FireExceptionHandlingConfigFailureEvent()
 {
     ExceptionHandlingConfigFailureEvent.Fire("test");
 }