/// <summary>获取错误消息</summary> public static string GetMessage(System.Exception ex) { StringBuilder result = new StringBuilder(); foreach (System.Exception exception in (IEnumerable <System.Exception>)Warning.GetExceptions(ex)) { Warning.AppendMessage(result, exception); } return(result.ToString().RemoveEnd(Environment.NewLine)); }
/// <summary>获取异常列表</summary> public IList <System.Exception> GetExceptions() { return(Warning.GetExceptions((System.Exception) this)); }