private void HandleLoadError(string name, Exception e) { if (e as IOException != null || e as XmlException != null || e as TypeInitializationException != null || e as SerializationException != null || e as ArgumentNullException != null) { ScheduledJobDefinition.RemoveDefinition(name); this.WriteErrorLoadingDefinition(name, e); } }
private void HandleLoadError(string name, Exception e) { if (e is System.IO.IOException || e is System.Xml.XmlException || e is System.TypeInitializationException || e is System.Runtime.Serialization.SerializationException || e is System.ArgumentNullException) { // Remove the corrupted scheduled job definition and // notify user with error message. ScheduledJobDefinition.RemoveDefinition(name); WriteErrorLoadingDefinition(name, e); } }