/[AnywhereTS-MSSQL]/trunk/TSControlPanel/Program.cs
ViewVC logotype

Diff of /trunk/TSControlPanel/Program.cs

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

--- trunk/TSControlPanel/Program.cs	2012/07/12 16:30:29	53
+++ trunk/TSControlPanel/Program.cs	2012/07/12 16:32:50	55
@@ -29,7 +29,7 @@
                 Logging.TSControlPanelLog.Error("Encountered unhandled Exception, but the exception was null");
                 return;
             }
-            if (e.ExceptionObject.GetType() == typeof(SqlException))
+            if (ex.GetType() == typeof(SqlException))
             {
                 SqlException sql_ex = (ex as SqlException);
                 using (log4net.NDC.Push(string.Format("SqlException: ID={0} MESSAGE={1}{2}Diagnostics:{2}{3}", sql_ex.Number.ToString(), sql_ex.Message, System.Environment.NewLine, sql_ex.ToString())))
@@ -39,7 +39,7 @@
             }
             else
             {
-                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("Exception: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString())))
                 {
                     Logging.TSControlPanelLog.Error("Encountered unhandled Exception");
                 }

 

  ViewVC Help
Powered by ViewVC 1.1.22