예제 #1
0
        /// <summary>获取异常列表</summary>
        /// <param name="ex">异常</param>
        public static IList <System.Exception> GetExceptions(System.Exception ex)
        {
            List <System.Exception> result = new List <System.Exception>();

            Warning.AddException(result, ex);
            return((IList <System.Exception>)result);
        }
예제 #2
0
 /// <summary>添加内部异常</summary>
 private static void AddException(List <System.Exception> result, System.Exception exception)
 {
     if (exception == null)
     {
         return;
     }
     result.Add(exception);
     Warning.AddException(result, exception.InnerException);
 }