/[EmuXPortal]/trunk/EmuXPortal/Api/RomConfig.cs
ViewVC logotype

Diff of /trunk/EmuXPortal/Api/RomConfig.cs

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

--- trunk/EmuXPortal/Api/RomConfig.cs	2012/08/22 02:47:38	106
+++ trunk/EmuXPortal/Api/RomConfig.cs	2012/08/23 02:10:16	107
@@ -35,7 +35,14 @@
                 this.RomTitle = EMUConfig.GameTitle == "" ? fi.Name : EMUConfig.GameTitle;                
                 string rom_img = "";
                 // load image
-                if (File.Exists(string.Format("{0}.jpg", fi.FullName.Replace(fi.Extension, "")))) { rom_img = string.Format("{0}.jpg", fi.FullName.Replace(fi.Extension, "")); }
+                try
+                {
+                    if (File.Exists(string.Format("{0}.jpg", fi.FullName.Replace(fi.Extension, "")))) { rom_img = string.Format("{0}.jpg", fi.FullName.Replace(fi.Extension, "")); }
+                }
+                catch (Exception ex)
+                {
+                    logger.WriteLine("Error Loading an Image file for: {1}{0}Error:{0}{2}",System.Environment.NewLine, fi.FullName, ex.ToString());
+                }
                 try
                 {
                     if (rom_img != string.Empty)

 

  ViewVC Help
Powered by ViewVC 1.1.22