public override string ToString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine(HybridStrings.ErrorTaskExceptionTemplate(this.Subtask, this.Message)); if (this.Errors != null && this.Errors.Count <LocalizedString>() > 0) { stringBuilder.AppendLine(); foreach (LocalizedString value in this.Errors) { stringBuilder.AppendLine(value); } } for (Exception innerException = base.InnerException; innerException != null; innerException = innerException.InnerException) { stringBuilder.AppendLine(); stringBuilder.AppendLine(innerException.Message); if (innerException.InnerException == null) { stringBuilder.AppendLine(innerException.StackTrace); } } return(stringBuilder.ToString()); }