Table of Contents

Class AkriMqttException

Namespace
Azure.Iot.Operations.Protocol
Assembly
Azure.Iot.Operations.Protocol.dll
public class AkriMqttException : Exception, ISerializable
Inheritance
AkriMqttException
Implements
Inherited Members

Constructors

AkriMqttException(string)

public AkriMqttException(string message)

Parameters

message string

AkriMqttException(string, Exception)

public AkriMqttException(string message, Exception innerException)

Parameters

message string
innerException Exception

Properties

CommandName

The name of a command relevant to the Azure.Iot.Operations.Protocol error being reported

public string? CommandName { get; }

Property Value

string

CorrelationId

The correlation data used to connect a command response to a command request.

public Guid? CorrelationId { get; }

Property Value

Guid?

HeaderName

The name of an MQTT header that is missing or has an invalid value

public string? HeaderName { get; init; }

Property Value

string

HeaderValue

The value of an MQTT header that is invalid

public string? HeaderValue { get; init; }

Property Value

string

IsRemote

true if the error was detected by a remote component

public required bool IsRemote { get; init; }

Property Value

bool

IsShallow

true if the error was identified immediately after the API was called, prior to any attempted network communication

public required bool IsShallow { get; init; }

Property Value

bool

Kind

The specific kind of error that occurred

public required AkriMqttErrorKind Kind { get; init; }

Property Value

AkriMqttErrorKind

PropertyName

The name of a method argument or a property in a class, configuration file, or environment variable that is missing or has an invalid value

public string? PropertyName { get; }

Property Value

string

PropertyValue

The value of a method argument or a property in a class, configuration file, or environment variable that is invalid

public object? PropertyValue { get; }

Property Value

object

ProtocolVersion

The protocol version that was not supported. Only provided if the error was either a AkriMqttErrorKind.UnsupportedRequestVersion kind or a AkriMqttErrorKind.UnsupportedResponseVersion kind.

public string? ProtocolVersion { get; set; }

Property Value

string

SupportedMajorProtocolVersions

The list of supported protocol versions that can be used instead. Only provided if the error was either a AkriMqttErrorKind.UnsupportedRequestVersion kind or a AkriMqttErrorKind.UnsupportedResponseVersion kind.

public int[]? SupportedMajorProtocolVersions { get; }

Property Value

int[]

TimeoutName

The name of a timeout condition that elapsed

public string? TimeoutName { get; }

Property Value

string

TimeoutValue

The duration of a timeout condition that elapsed

public TimeSpan? TimeoutValue { get; }

Property Value

TimeSpan?

Methods

GetArgumentInvalidException(string?, string, object?, string?)

public static AkriMqttException GetArgumentInvalidException(string? commandName, string argumentName, object? argumentValue, string? message = null)

Parameters

commandName string
argumentName string
argumentValue object
message string

Returns

AkriMqttException

GetConfigurationInvalidException(string, object?, string?, Exception?, string?)

public static AkriMqttException GetConfigurationInvalidException(string configurationName, object? configurationValue, string? message = null, Exception? innerException = null, string? commandName = null)

Parameters

configurationName string
configurationValue object
message string
innerException Exception
commandName string

Returns

AkriMqttException

GetPayloadInvalidException()

public static AkriMqttException GetPayloadInvalidException()

Returns

AkriMqttException