v7.3.2018.0614   重构高性能资源池,减少GC压力,增加线程池,让异步任务得到平等竞争CPU的机会
大石头 编写于 2018-06-14 17:56:44
X
using System;

namespace NewLife.Net.Modbus
{
    /// <summary>Modbus异常</summary>
    public class ModbusException : Exception
    {
        private Errors _Error;
        /// <summary>错误代码</summary>
        public Errors Error { get { return _Error; } private set { _Error = value; } }

        /// <summary>初始化</summary>
        /// <param name="error"></param>
        public ModbusException(Errors error) { Error = error; }

        /// <summary>已重载。</summary>
        /// <returns></returns>
        public override String ToString()
        {
            return "Modbus Error " + Error;
        }
    }
}