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

Diff of /trunk/TSAdminTool/frmConfigMode.cs

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

--- trunk/TSAdminTool/frmConfigMode.cs	2012/07/11 14:19:13	4
+++ trunk/TSAdminTool/frmConfigMode.cs	2012/07/12 18:56:31	64
@@ -20,7 +20,7 @@
 
         private void Mode_Load(object sender, EventArgs e)
         {
-            this.Cursor = Cursors.WaitCursor;
+            //this.Cursor = Cursors.WaitCursor;
             if (ATSGlobals.configured == 0)
             {  // ATS not configured yet
                 radManagedMode.Checked = true;
@@ -71,6 +71,13 @@
                 {
                     this.Cursor = Cursors.Default;
                     MessageBox.Show("Could not create directory '" + txtDatabasePath.Text.Trim() + "'. Error: " + ex.Message);
+                    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("directory={0}", txtDatabasePath.Text)))
+                        {
+                            Logging.ATSAdminLog.Error("Could not create directory.");
+                        }
+                    }
                     return;
                 }
 
@@ -103,6 +110,13 @@
                 {
                     this.Cursor = Cursors.Default;
                     MessageBox.Show("Could not create directory '" + txtDestinationDir.Text.Trim() + "'. Error: " + ex.Message);
+                    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("directory={0}", txtDestinationDir.Text)))
+                        {
+                            Logging.ATSAdminLog.Error("Could not create directory.");
+                        }
+                    }
                     return;
                 }
 
@@ -115,7 +129,14 @@
             }
             else
             {
-                throw new Exception("Error: Unknown mode (84377)");
+                string error = "Error: Unknown mode (84377)";
+                using (log4net.NDC.Push(string.Format("mode={0}", ATSGlobals.managedMode)))
+                {
+                    Logging.ATSAdminLog.Error(error);
+                }
+                MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("mode={0}", ATSGlobals.managedMode)));
+                return;
+
             }
             // Save the database directory to registry
             ProSupport.strDatabasePath = txtDatabasePath.Text.Trim();

 

  ViewVC Help
Powered by ViewVC 1.1.22