79 |
} |
} |
80 |
catch (SqlException ex) |
catch (SqlException ex) |
81 |
{ |
{ |
82 |
using (log4net.NDC.Push(string.Format("SqlException: ID={0} MESSAGE={1}{2}Diagnostics:{2}{3}", ex.Number.ToString(), ex.Message, System.Environment.NewLine, ex.ToString()))) |
SqlException e = (ex.GetBaseException() as SqlException); |
83 |
|
using (log4net.NDC.Push(string.Format("SqlException: ID={0} MESSAGE={1}{2}Diagnostics:{2}{3}", e.Number.ToString(), e.Message, System.Environment.NewLine, e.ToString()))) |
84 |
{ |
{ |
85 |
Logging.DatabaseLog.Error(string.Format("Failed to create command instance using command: {0}", command)); |
Logging.DatabaseLog.Error(string.Format("Failed to create command instance using command: {0}", command)); |
86 |
} |
} |
88 |
} |
} |
89 |
catch (Exception ex) |
catch (Exception ex) |
90 |
{ |
{ |
91 |
using (log4net.NDC.Push(string.Format("{0}: MESSAGE={1}{2}Diagnostics:{2}{3}", ex.GetType().Name, ex.Message, System.Environment.NewLine, ex.ToString()))) |
Exception e = ex.GetBaseException(); |
92 |
|
using (log4net.NDC.Push(string.Format("{0}: MESSAGE={1}{2}Diagnostics:{2}{3}", e.GetType().Name, e.Message, System.Environment.NewLine, e.ToString()))) |
93 |
{ |
{ |
94 |
Logging.DatabaseLog.Error(string.Format("Failed to create command instance using command: {0}", command)); |
Logging.DatabaseLog.Error(string.Format("Failed to create command instance using command: {0}", command)); |
95 |
} |
} |
329 |
} |
} |
330 |
catch (SqlException ex) |
catch (SqlException ex) |
331 |
{ |
{ |
332 |
using (log4net.NDC.Push(string.Format("SqlException: ID={0} MESSAGE={1}{2}Diagnostics:{2}{3}", ex.Number.ToString(), ex.Message, System.Environment.NewLine, ex.ToString()))) |
SqlException e = (ex.GetBaseException() as SqlException); |
333 |
|
using (log4net.NDC.Push(string.Format("SqlException: ID={0} MESSAGE={1}{2}Diagnostics:{2}{3}", e.Number.ToString(), e.Message, System.Environment.NewLine, e.ToString()))) |
334 |
{ |
{ |
335 |
Logging.DatabaseLog.Error(string.Format("Failed to run script: {0}{1}", System.Environment.NewLine, strFile)); |
Logging.DatabaseLog.Error(string.Format("Failed to run script: {0}{1}", System.Environment.NewLine, strFile)); |
336 |
} |
} |
337 |
ErrorInfo = ex; |
ErrorInfo = ex; throw ErrorInfo; |
338 |
} |
} |
339 |
catch (Exception ex) |
catch (Exception ex) |
340 |
{ |
{ |
341 |
using (log4net.NDC.Push(string.Format("{0}: MESSAGE={1}{2}Diagnostics:{2}{3}", ex.GetType().Name, ex.Message, System.Environment.NewLine, ex.ToString()))) |
Exception e = ex.GetBaseException(); |
342 |
|
using (log4net.NDC.Push(string.Format("{0}: MESSAGE={1}{2}Diagnostics:{2}{3}", e.GetType().Name, e.Message, System.Environment.NewLine, e.ToString()))) |
343 |
{ |
{ |
344 |
Logging.DatabaseLog.Error(string.Format("Failed to run script: {0}{1}", System.Environment.NewLine, strFile)); |
Logging.DatabaseLog.Error(string.Format("Failed to run script: {0}{1}", System.Environment.NewLine, strFile)); |
345 |
} |
} |
346 |
ErrorInfo = ex; |
ErrorInfo = ex; throw ErrorInfo; |
347 |
} |
} |
348 |
return false; |
return false; |
349 |
} |
} |