Exemplo n.º 1
0
        /// <summary>
        /// 根据异常ID获得异常描述信息
        /// todo 待处理异常ID为 7、8
        /// </summary>
        /// <param name="exceptionId"></param>
        /// <returns></returns>
        public static FaultInfo GetInfo(int exceptionId)
        {
            FaultInfo result = null;

            try
            {
                result = (from faultInfo in FaultInfoList
                          where faultInfo.Code == exceptionId
                          select faultInfo).SingleOrDefault();
            }
            catch (System.Exception)
            {
                //
            }
            if (result == null)
            {
                //
            }
            return(result);
        }
Exemplo n.º 2
0
 public CommonException(int exceptionId)
 {
     _faultInfo = ApiException.Message.GetInfo(exceptionId);
 }