private string GetExceptionMessage(ExceptionPxC ExceptionData) { if (ExceptionData == null) { return(string.Empty); } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine(ExceptionData.Message); stringBuilder.AppendLine(string.Format((IFormatProvider)CultureInfo.InvariantCulture, PxCUtilStrings.ErrorSource, (object)ExceptionData.Source)); stringBuilder.AppendLine(); if (ExceptionData.InnerException != null) { stringBuilder.AppendLine(string.Format((IFormatProvider)CultureInfo.InvariantCulture, PxCUtilStrings.InnerErrors, (object)++this.innerCount)); stringBuilder.AppendLine(); stringBuilder.AppendLine(this.GetExceptionMessage((ExceptionPxC)ExceptionData.InnerException)); } else { if (ExceptionData.DateAndTime != DateTime.MinValue) { stringBuilder.Append(string.Format((IFormatProvider)CultureInfo.InvariantCulture, PxCUtilStrings.Timestamp, (object)ExceptionData.DateAndTime.ToString())); } this.innerCount = 0; } return(stringBuilder.ToString()); }
public ExceptionPxC(string pMessage, ExceptionPxC InnerException) : base(pMessage, (Exception)InnerException) { this.DateAndTime = DateTime.Now; }