public void ExceptionHandlingErrorOccurred(object sender, ExceptionHandlingErrorEventArgs e) { if (EventLoggingEnabled) { string errorMessage = string.Format( Resources.Culture, Resources.ErrorHandlingExceptionMessage, instanceName); string entryText = new EventLogEntryFormatter(Resources.BlockName).GetEntryText(errorMessage, e.Message); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } if (WmiEnabled) { FireManagementInstrumentation(new ExceptionHandlingFailureEvent(instanceName, e.Message)); } }
private void ErrorCallback(object sender, ExceptionHandlingErrorEventArgs e) { errorCalledBack = true; }
public void ExceptionHandlingErrorOccurred(object sender, ExceptionHandlingErrorEventArgs e) { if (EventLoggingEnabled) { string errorMessage = string.Format( Resources.Culture, Resources.ErrorHandlingExceptionMessage, instanceName); string entryText = new EventLogEntryFormatter(Resources.BlockName).GetEntryText(errorMessage, e.Message); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } if (WmiEnabled) ManagementInstrumentation.Fire(new ExceptionHandlingFailureEvent(instanceName, e.Message)); }