[fix]Config创建默认配置文件的开关Runtime.CreateConfigOnMissing,仅需对自动创建生效,而不应该阻止用户主动Save
智能大石头 编写于 2024-08-09 00:30:41 石头 提交于 2024-08-10 14:22:24
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;
        }
    }
}