Exemplo n.º 1
0
 /// <summary>
 /// Sends the error.
 /// </summary>
 /// <param name="EM">The em.</param>
 public override void SendError(ErrorMessage EM)
 {
     Console.WriteLine("LOG: " + GetIndentString() + " ERROR: " + EM.Message);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Sends the error.
 /// </summary>
 /// <param name="EM">The em.</param>
 public abstract void SendError(ErrorMessage EM);
Exemplo n.º 3
0
        /// <summary>
        /// Sends the error.
        /// </summary>
        /// <param name="EM">The em.</param>
        public override void SendError(ErrorMessage EM)
        {
            ArrayList tempArray = EM.ExceptionObject == null ?
                new ArrayList(EM.Message.Split('\r', '\n')) :
                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 += "       ";
            OutputStream.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)
                {
                    OutputStream.WriteLine("{0} {1}",
                      tempString,
                      s);
                }
            }
            WriteMessage = true;
        }