35 lines
1.4 KiB
C#
35 lines
1.4 KiB
C#
using MxGateway.Contracts.Proto;
|
|
|
|
namespace MxGateway.Client;
|
|
|
|
/// <summary>Exception thrown when a gateway command fails due to an unclassified protocol error.</summary>
|
|
public class MxGatewayCommandException : MxGatewayException
|
|
{
|
|
/// <summary>Initializes a new instance with the given details.</summary>
|
|
/// <param name="message">The error message describing the command failure.</param>
|
|
/// <param name="sessionId">The session ID, if available.</param>
|
|
/// <param name="correlationId">The correlation ID for tracing, if available.</param>
|
|
/// <param name="protocolStatus">The protocol status details, if available.</param>
|
|
/// <param name="hResult">The HResult code, if available.</param>
|
|
/// <param name="statuses">The MXAccess statuses, if available.</param>
|
|
/// <param name="innerException">The underlying exception, if any.</param>
|
|
public MxGatewayCommandException(
|
|
string message,
|
|
string? sessionId = null,
|
|
string? correlationId = null,
|
|
ProtocolStatus? protocolStatus = null,
|
|
int? hResult = null,
|
|
IReadOnlyList<MxStatusProxy>? statuses = null,
|
|
Exception? innerException = null)
|
|
: base(
|
|
message,
|
|
sessionId,
|
|
correlationId,
|
|
protocolStatus,
|
|
hResult,
|
|
statuses ?? [],
|
|
innerException)
|
|
{
|
|
}
|
|
}
|