ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/xmltv_parser/trunk/libxmltv/Core/XMLTV_LOADER.cs
(Generate patch)

Comparing trunk/libxmltv/Core/XMLTV_LOADER.cs (file contents):
Revision 19 by william, Thu Mar 7 10:00:40 2013 UTC vs.
Revision 21 by william, Thu Mar 7 10:04:58 2013 UTC

--- trunk/libxmltv/Core/XMLTV_LOADER.cs	2013/03/07 10:00:40	19
+++ trunk/libxmltv/Core/XMLTV_LOADER.cs	2013/03/07 10:04:58	21
@@ -58,7 +58,15 @@ namespace libxmltv.Core
         {
             XMLTV_LOGGER.Log.Info.WriteLine("Loading XMLTV File: {0}", XmlFile.Name);
             //XMLTV_LOGGER.Log.Warn.WriteLine("XML File Loading has not been implemented yet!");
-            XDocument doc = XDocument.Load(XmlFile.FullName);
+            try
+            {
+                XDocument doc = XDocument.Load(XmlFile.FullName);
+            }
+            catch (Exception ex)
+            {
+                XMLTV_LOGGER.Log.Error.WriteLine("Failed to load XMLTV File: {0}", XmlFile.Name);
+                XMLTV_LOGGER.Log.Error.WriteLine(ex.GetBaseException().ToString());
+            }
         }
     }
 }