--- trunk/libxmltv/Core/XMLTVInstance.cs 2013/03/08 12:05:33 56 +++ trunk/libxmltv/Core/XMLTVInstance.cs 2013/03/08 12:20:50 58 @@ -117,30 +117,34 @@ { throw new NullReferenceException("Failed to load from instance because the instance is null."); } - xmltv_logger.Debug.WriteLine("Loading from instance: '{0}'", instance.XmlFile.Name); + if (instance.Source != null) { - xmltv_logger.Info.WriteLine("{0}", instance.Source.ToString()); + xmltv_logger.Debug.WriteLine("Loading from instance..."); + xmltv_logger.Info.WriteLine("Source Loaded: '{0}' Created by '{1}' - original source file: '{2}'", instance.Source.SourceName, instance.Source.GeneratorName, instance.XmlFile.FullName); } else { xmltv_logger.Error.WriteLine("The Instance's Source Property is null."); + throw new NullReferenceException("The Instance's Source Property is null."); } if (instance.Channels != null) { - xmltv_logger.Info.WriteLine("Loaded: {0} Channels", instance.Channels.Count); + xmltv_logger.Info.WriteLine("Source Loaded: '{0}' Channels from source '{1}'", instance.Channels.Count, instance.Source.SourceName); } else { xmltv_logger.Error.WriteLine("The Instance's Channels Property is null."); + throw new NullReferenceException("The Instance's Channels Property is null."); } if (instance.Programs != null) { - xmltv_logger.Info.WriteLine("Loaded: {0} Programs", instance.Programs.Count); + xmltv_logger.Info.WriteLine("Source Loaded: '{0}' Programs from source '{1}", instance.Programs.Count, instance.Source.SourceName); } else { xmltv_logger.Error.WriteLine("The Instance's Programs Property is null."); + throw new NullReferenceException("The Instance's Programs Property is null."); } CloneFromInstance(ref instance); //if (OnInstanceCreated != null)