using System; using System.Text; namespace Neo.Afx.ComponentModel { /// /// Contains Exception extensions methods /// public static partial class Extensions { #region ToStringComplete /// /// Returns a string that also includes the inner exceptions. /// /// The exception to be queried /// A string that also includes the inner exceptions. public static string ToStringComplete(this Exception e) { var error = new StringBuilder(); while(e != null) { error.AppendLine(e.ToString()); e = e.InnerException; } return error.ToString(); } #endregion } }