This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user