/[xmltv_parser]/branches/linux/xmltv_parser/libxmltv/Core/XMLTVProgram.cs
ViewVC logotype

Diff of /branches/linux/xmltv_parser/libxmltv/Core/XMLTVProgram.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/libxmltv/Core/XMLTVProgram.cs	2013/03/09 11:23:09	76
+++ trunk/libxmltv/Core/XMLTVProgram.cs	2013/03/09 11:36:24	78
@@ -5,6 +5,8 @@
 using libxmltv.Interfaces;
 using System.Xml.Linq;
 using System.Reflection;
+using System.IO;
+using System.Diagnostics;
 
 namespace libxmltv.Core
 {
@@ -24,10 +26,13 @@
         public XMLTVProgram(XMLTVRuntimeInstance instance, XElement node)
             : base(instance, XMLTVConstants.PROGRAM_ELEMENT)
         {
+            try {
             xmltv_logger.Verbose.Debug.WriteLine("Creating Instance of XMLTVProgram");
             Create(node);
             xmltv_logger.Verbose.Debug.WriteLine("Created Instance of XMLTVProgram");
             UpdateInstance();
+            }
+            catch (IOException ex) { Debug.WriteLine(ex.ToString()); }
         }
         #region IXMLTVProgram members
         public int Id { get; set; }
@@ -55,10 +60,11 @@
                     found_field = true;
                     try
                     {
-                        xmltv_logger.Verbose.Debug.WriteLine("Updating instance with program information: {0}", this.ToString());
+                        
                         var list = (List<IXMLTVProgram>)field.GetValue(this.GetInstance());
                         this.Id = list.Count + 1;
                         list.Add(this);
+                        xmltv_logger.Verbose.Debug.WriteLine("Updating instance with program information: {0}", this.ToString());
                         field.SetValue(this.GetInstance(), list);
                         break;
                     }

 

  ViewVC Help
Powered by ViewVC 1.1.22