ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/EmuXPortal/trunk/EmuXPortal/Api/ConfigLoader.cs
(Generate patch)

Comparing trunk/EmuXPortal/Api/ConfigLoader.cs (file contents):
Revision 13 by william, Tue Apr 3 21:00:28 2012 UTC vs.
Revision 14 by william, Tue Apr 3 21:35:13 2012 UTC

# Line 6 | Line 6 | using System.Text;
6   using System.Windows.Forms;
7   using System.Xml;
8   using System.IO;
9 + using EmuXPortal.Logging;
10  
11   namespace EmuXPortal.Api
12   {
# Line 39 | Line 40 | namespace EmuXPortal.Api
40                  bool loaded = false;
41                  try
42                  {
43 +                    logger.WriteLine("Loading Config: {0}", path);
44                      using (FileStream fs = new FileStream(CONFIG_FILE_PATH, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
45                      {
46                          using (XmlReader reader = XmlReader.Create(fs))
# Line 49 | Line 51 | namespace EmuXPortal.Api
51                              DisplayDevice = reader.ReadElementContentAsString();
52                          }
53                      }
54 +                    logger.WriteLine("Loaded Config: {0}", path);
55                      loaded = true;
56                  }
57                  catch (Exception ex)
58                  {
59 +                    logger.WriteLine("\tFailed to Load Config: {0}", path);
60                      Console.WriteLine(ex.ToString());
61 +                    logger.WriteLine("Error: {0}", ex.ToString());
62                      loaded = false;
63                  }
64                  return loaded;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines