43 |
|
} |
44 |
|
if (e.GetType() == typeof(SqlException)) |
45 |
|
{ |
46 |
< |
SqlException sql_ex = (e as SqlException); |
46 |
> |
SqlException sql_ex = (e.GetBaseException() as SqlException); |
47 |
|
List<string> strs = new List<string>(); |
48 |
|
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()))) |
49 |
|
{ |
83 |
|
} |
84 |
|
else |
85 |
|
{ |
86 |
+ |
e = e.GetBaseException(); |
87 |
|
List<string> strs = new List<string>(); |
88 |
|
using (log4net.NDC.Push(string.Format("{0}: MESSAGE={1}{2}Diagnostics:{2}{3}", e.GetType().Name, e.Message, System.Environment.NewLine, e.ToString()))) |
89 |
|
{ |