This commit is contained in:
Jsj
2008-05-16 18:07:47 +00:00
parent 9d0b3cd543
commit cda0291dbd
116 changed files with 4257 additions and 3382 deletions

View File

@@ -28,7 +28,7 @@ namespace VEPROMS.CSLA.Library
#region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion
public static void LogException(string s,Exception ex)
public static void LogException(string s, Exception ex)
{
int i = 0;
Console.WriteLine("Error - {0}", s);
@@ -44,14 +44,14 @@ namespace VEPROMS.CSLA.Library
set { _LoggingInfo = value; }
}
static System.Diagnostics.Process _CurrentProcess = System.Diagnostics.Process.GetCurrentProcess();
public static void LogInfo(string s,int hashCode)
public static void LogInfo(string s, int hashCode)
{
if (_LoggingInfo)
if (_LoggingInfo)
Console.WriteLine("{0} MB {1}", _CurrentProcess.WorkingSet64 / 1000000, string.Format(s, hashCode));
}
public static void LogDebug(string s,int hashCode)
public static void LogDebug(string s, int hashCode)
{
if (_LoggingInfo)
if (_LoggingInfo)
Console.WriteLine("{0} MB {1}", _CurrentProcess.WorkingSet64 / 1000000, string.Format(s, hashCode));
}
public static string VEPROMS_Connection
@@ -107,7 +107,7 @@ namespace VEPROMS.CSLA.Library
}
catch (Exception ex)// Throw Application Exception on Failure
{
if(_MyLog.IsErrorEnabled)_MyLog.Error("Connection Error", ex);
if (_MyLog.IsErrorEnabled) _MyLog.Error("Connection Error", ex);
throw new ApplicationException("Failure on Connect", ex);
}
}
@@ -124,14 +124,14 @@ namespace VEPROMS.CSLA.Library
}
catch (Exception ex)
{
if(_MyLog.IsErrorEnabled)_MyLog.Error("Purge Error", ex);
if (_MyLog.IsErrorEnabled) _MyLog.Error("Purge Error", ex);
throw new ApplicationException("Failure on Purge", ex);
}
}
}
public class DbCslaException : Exception
{
internal DbCslaException(string message, Exception innerException):base(message,innerException){;}
internal DbCslaException(string message, Exception innerException) : base(message, innerException) { ;}
internal DbCslaException(string message) : base(message) { ;}
internal DbCslaException() : base() { ;}
} // Class