/[AnywhereTS-MSSQL]/trunk/TSAdminTool/Image.cs
ViewVC logotype

Diff of /trunk/TSAdminTool/Image.cs

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

--- trunk/TSAdminTool/Image.cs	2012/07/11 14:19:13	4
+++ trunk/TSAdminTool/Image.cs	2012/07/12 14:17:14	46
@@ -114,6 +114,10 @@
             catch (Exception e)
             {
                 MessageBox.Show("Error: Could not write configuration to disk (67732). Do you have sufficient rights? Error:" + e.Message);
+                using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString())))
+                {
+                    Logging.ATSAdminLog.Error("Could not write configuration to disk (67732)");
+                }
             }
 
             // Save designtime parameters to database, so they will be remembered to next time
@@ -235,6 +239,13 @@
                     catch (Microsoft.VisualBasic.FileIO.MalformedLineException ex)
                     {
                         MessageBox.Show("Error in file " + strFile + ", line: '" + ex.Message + "'is not valid and will be skipped (77224).");
+                        using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString())))
+                        {
+                            using (log4net.NDC.Push(string.Format("file={0} line={1}", strFile, ex.Message)))
+                            {
+                                Logging.ATSAdminLog.Error("Encountered invalid file");
+                            }
+                        }
                     }
                 } // While
             } // using
@@ -263,6 +274,13 @@
                     catch (Microsoft.VisualBasic.FileIO.MalformedLineException ex)
                     {
                         MessageBox.Show("Error in file " + strFile + ", line: '" + ex.Message + "'is not valid and will be skipped.");
+                        using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString())))
+                        {
+                            using (log4net.NDC.Push(string.Format("file={0} line={1}", strFile, ex.Message)))
+                            {
+                                Logging.ATSAdminLog.Error("Encountered invalid file");
+                            }
+                        }
                     }
                 } // While
                 // We have found the right row
@@ -311,6 +329,12 @@
                     default:
                         MessageBox.Show("ERROR unknown boot picture resolution (49488)");
                         strString += " vga=791"; // Default to 1024x768
+
+                        using (log4net.NDC.Push(string.Format("width=", DesigntimeConfig.BootPicture.Width)))
+                            {
+                                Logging.ATSAdminLog.Error("ERROR unknown boot picture resolution (49488)");
+                            }
+                        
                         break;
                 }
             }
@@ -360,6 +384,12 @@
             if (!File.Exists(strBase + @"\client"))
             {
                 MessageBox.Show("Internal error: Failed to create Network Boot Image. Aborting (22399).", "AnywhereTS", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+
+                using (log4net.NDC.Push(string.Format("image=", strBase + @"\client")))
+                    {
+                        Logging.ATSAdminLog.Error("Failed to create Network Boot Image.");
+                    }
+                
                 Application.Exit();
             }
             try
@@ -484,6 +514,12 @@
             else
             {
                 MessageBox.Show("Error cannot write to file (10565)", "AnywhereTS");
+               
+                    using (log4net.NDC.Push(string.Format("file={0}", isolinuxCfg)))
+                    {
+                        Logging.ATSAdminLog.Error("Cannot write to file");
+                    }
+                
                 return;
             }
         }

 

  ViewVC Help
Powered by ViewVC 1.1.22