ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/AnywhereTS-MSSQL/trunk/TSAdminTool/Program.cs
(Generate patch)

Comparing trunk/TSAdminTool/Program.cs (file contents):
Revision 127 by william, Sat Jul 14 07:18:30 2012 UTC vs.
Revision 128 by william, Sat Jul 14 13:01:52 2012 UTC

--- 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 @@ namespace AnywhereTS
             }
             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 @@ namespace AnywhereTS
             }
             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())))
                 {