/[AnywhereTS-MSSQL]/trunk/AnywhereTS.DBSupport/DBConnector.cs
ViewVC logotype

Diff of /trunk/AnywhereTS.DBSupport/DBConnector.cs

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

revision 125 by william, Sat Jul 14 11:44:52 2012 UTC revision 128 by william, Sat Jul 14 13:01:52 2012 UTC
# Line 79  namespace AnywhereTS.DBSupport Line 79  namespace AnywhereTS.DBSupport
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                  }                  }
# Line 87  namespace AnywhereTS.DBSupport Line 88  namespace AnywhereTS.DBSupport
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                  }                  }
# Line 327  namespace AnywhereTS.DBSupport Line 329  namespace AnywhereTS.DBSupport
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          }          }

Legend:
Removed from v.125  
changed lines
  Added in v.128

  ViewVC Help
Powered by ViewVC 1.1.22