namespace ZB.MOM.WW.MxGateway.Server.Workers; /// /// Exception thrown when a worker frame protocol violation occurs. /// public sealed class WorkerFrameProtocolException : Exception { /// /// Initializes a frame protocol exception with an error code and message. /// /// Protocol error code indicating the violation type. /// Human-readable error message. public WorkerFrameProtocolException( WorkerFrameProtocolErrorCode errorCode, string message) : base(message) { ErrorCode = errorCode; } /// /// Initializes a frame protocol exception with an error code, message, and inner exception. /// /// Protocol error code indicating the violation type. /// Human-readable error message. /// Underlying exception that caused this protocol violation. public WorkerFrameProtocolException( WorkerFrameProtocolErrorCode errorCode, string message, Exception innerException) : base(message, innerException) { ErrorCode = errorCode; } /// /// Gets the worker frame protocol error code. /// public WorkerFrameProtocolErrorCode ErrorCode { get; } }