| 1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- namespace IvfTl.AutoFocus.Layout
- {
- /// <summary>
- /// 对焦层配置缺失专用异常(§2.5:层间距等关键配置两级皆空时抛出,不用魔法数兜底)。
- /// 调用方(M2-03/M2-05)据此弹"请先配置"告警并跳过本轮,而不是用硬编码值继续。
- /// 携带设备 tl_sn / 仓室 / well 信息供告警与定位。
- /// </summary>
- public sealed class FocusConfigMissingException : Exception
- {
- /// <summary>设备 tl_sn。</summary>
- public string TlSn { get; }
- /// <summary>仓室编号。</summary>
- public int HouseSn { get; }
- /// <summary>well 编号。</summary>
- public int WellSn { get; }
- /// <summary>
- /// 默认消息:层间距未配置。消息形如"设备{tlSn}对焦层间距未配置,请先初始化"(§2.5)。
- /// </summary>
- public FocusConfigMissingException(string tlSn, int houseSn, int wellSn)
- : this(tlSn, houseSn, wellSn, $"设备{tlSn}对焦层间距未配置,请先初始化")
- {
- }
- /// <summary>自定义消息(用于层数/下移等其它缺失场景)。</summary>
- public FocusConfigMissingException(string tlSn, int houseSn, int wellSn, string message)
- : base(message)
- {
- TlSn = tlSn;
- HouseSn = houseSn;
- WellSn = wellSn;
- }
- }
- }
|