/// <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); }
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); }
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); }
private void FireExceptionHandlingConfigFailureEvent() { ExceptionHandlingConfigFailureEvent.Fire("test"); }