IotHubServiceException Constructors

Definition

Overloads

IotHubServiceException(String, Exception)

Creates an instance of this class with the specified error message and optional inner exception.

IotHubServiceException(String, HttpStatusCode, IotHubServiceErrorCode, String, Exception)

Creates an instance of this class with HttpStatusCode, IotHubServiceErrorCode, error message, a flag indicating if the error was transient, an optional tracking id and an optional reference to the inner exception that caused this exception.

IotHubServiceException(String, Exception)

Creates an instance of this class with the specified error message and optional inner exception.

public IotHubServiceException (string message, Exception innerException = default);
new Microsoft.Azure.Devices.IotHubServiceException : string * Exception -> Microsoft.Azure.Devices.IotHubServiceException
Public Sub New (message As String, Optional innerException As Exception = Nothing)

Parameters

message
String

The message that describes the error.

innerException
Exception

An inner exception, if any.

Applies to

IotHubServiceException(String, HttpStatusCode, IotHubServiceErrorCode, String, Exception)

Creates an instance of this class with HttpStatusCode, IotHubServiceErrorCode, error message, a flag indicating if the error was transient, an optional tracking id and an optional reference to the inner exception that caused this exception.

public IotHubServiceException (string message, System.Net.HttpStatusCode statusCode, Microsoft.Azure.Devices.IotHubServiceErrorCode errorCode, string trackingId = default, Exception innerException = default);
new Microsoft.Azure.Devices.IotHubServiceException : string * System.Net.HttpStatusCode * Microsoft.Azure.Devices.IotHubServiceErrorCode * string * Exception -> Microsoft.Azure.Devices.IotHubServiceException
Public Sub New (message As String, statusCode As HttpStatusCode, errorCode As IotHubServiceErrorCode, Optional trackingId As String = Nothing, Optional innerException As Exception = Nothing)

Parameters

message
String

The message that describes the error.

statusCode
HttpStatusCode

The 3-digit status code returned back in the hub service response.

errorCode
IotHubServiceErrorCode

The 6-digit error code representing a more specific error in details.

trackingId
String

The service returned tracking Id associated with this particular error.

innerException
Exception

The exception that is the cause of the current exception.

Applies to