public void SendError(Exception Error) { if (Error != LastException) { LastException = Error; ErrorMessage EM = new ErrorMessage(); EM.InitializeNewMessage(); EM.ExceptionObject = Error; foreach (Destination d in _Destins) { d.SendError(EM); } } }
public void SendError(string Message) { ErrorMessage EM = new ErrorMessage(); EM.InitializeNewMessage(); EM.Message = Message; foreach (Destination d in _Destins) { d.SendError(EM); } }
public abstract void SendError(ErrorMessage EM);
public override void SendError(ErrorMessage EM) { Console.WriteLine("LOG: " + GetIndentString() + " ERROR: " + EM.Message); }
public override void SendError(ErrorMessage EM) { ArrayList TempArray; if (EM.ExceptionObject == null) { TempArray = new ArrayList(EM.Message.Split('\r', '\n')); } else { TempArray = new ArrayList(EM.ExceptionObject.ToString().Split('\r', '\n')); } string TempString = new String(' ', EM.UTCTime.ToString("dd-MM-yyyy").Length + 1 + EM.UTCTime.ToLongTimeString().Length); TempString += ""; TempString += GetIndentString(); TempString += " "; Output.WriteLine("{0}{1} ERROR: {2}", EM.UTCTime.ToString("dd-MM-yyyy") + " " + EM.UTCTime.ToLongTimeString(), GetIndentString(), TempArray[0].ToString()); TempArray.RemoveAt(0); foreach (String s in TempArray) { if (s.Trim('\r', '\n').Length != 0) { Output.WriteLine("{0} {1}", TempString, s); } } }