/// <summary> /// 将内部异常的等级递进。 /// </summary> /// <param name="rankExcep"></param> /// <returns><\returns> public static RankException RecurInner(RankException rankExcep) { rankExcep.Rank++; if (rankExcep.InnerException.GetType() == typeof(RankException)) { RankException excep = rankExcep.InnerException as RankException; return(RecurInner(excep)); } else { return(rankExcep); } }
public RankException(string msg, RankException innerExp) : this(innerExp.Rank, msg, innerExp) { RecurInner(innerExp); }