Example #1
0
        /// <summary>
        /// OperationException 构造函数
        /// </summary>
        /// <param name="errType">错误类别</param>
        /// <param name="errNo">错误号</param>
        /// <param name="err">系统错误</param>
        public OperationException(ErrType errType, ErrNo errNo, System.Exception err)
        {
            this.errType = errType;
            this.errNo = errNo;
            this.err = err;

            //使用log4net写入到日志文本文档
            CBB.Logger.SystemLog.LogHelper.WriteLog("\r\n错误编码:" + errNo.ToString() + "\r\n错误级别:" + errType.ToString() + "\r\n引发当前异常的方法:" + err.TargetSite.Name + "\r\n导致错误的应用程序或对象的名称:" + err.Source + "\r\n异常信息:" + err.Message);
        }
Example #2
0
        /// <summary>
        /// OperationException 构造函数
        /// </summary>
        /// <param name="errType">错误类别</param>
        /// <param name="errNo">错误号</param>
        public OperationException(ErrType errType, ErrNo errNo)
        {
            this.errType = errType;
            this.errNo = errNo;
            this.err = null;

            //使用log4net写入到日志文本文档
            CBB.Logger.SystemLog.LogHelper.WriteLog("\r\n错误编码:" + errNo.ToString() + "\r\n错误级别:" + errType.ToString());
        }