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

Diff of /trunk/TSAdminTool/Program.cs

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

--- trunk/TSAdminTool/Program.cs	2012/07/14 11:46:04	127
+++ trunk/TSAdminTool/Program.cs	2012/07/14 13:01:52	128
@@ -43,7 +43,7 @@
             }
             if (e.GetType() == typeof(SqlException))
             {
-                SqlException sql_ex = (e as SqlException);
+                SqlException sql_ex = (e.GetBaseException() as SqlException);
                 List<string> strs = new List<string>();
                 using (log4net.NDC.Push(string.Format("{0}: ID={1} MESSAGE={2}{3}Diagnostics:{3}{4}", sql_ex.GetType().Name, sql_ex.Number.ToString(), sql_ex.Message, System.Environment.NewLine, sql_ex.ToString())))
                 {
@@ -83,6 +83,7 @@
             }
             else
             {
+                e = e.GetBaseException();
                 List<string> strs = new List<string>();
                 using (log4net.NDC.Push(string.Format("{0}: MESSAGE={1}{2}Diagnostics:{2}{3}", e.GetType().Name, e.Message, System.Environment.NewLine, e.ToString())))
                 {

 

  ViewVC Help
Powered by ViewVC 1.1.22