你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

IotHubServiceException 构造函数

定义

重载

IotHubServiceException(String, Exception)

使用指定的错误消息和可选的内部异常创建此类的实例。

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

创建此类的实例,其中包含 HttpStatusCodeIotHubServiceErrorCode、错误消息、指示错误是否为暂时性的标志、可选的跟踪 ID 和对导致此异常的内部异常的可选引用。

IotHubServiceException(String, 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)

参数

message
String

描述错误的消息。

innerException
Exception

内部异常(如果有)。

适用于

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

创建此类的实例,其中包含 HttpStatusCodeIotHubServiceErrorCode、错误消息、指示错误是否为暂时性的标志、可选的跟踪 ID 和对导致此异常的内部异常的可选引用。

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)

参数

message
String

描述错误的消息。

statusCode
HttpStatusCode

在中心服务响应中返回的 3 位状态代码。

errorCode
IotHubServiceErrorCode

表示更具体的错误的 6 位数错误代码。

trackingId
String

服务返回与此特定错误关联的跟踪 ID。

innerException
Exception

导致当前异常的异常。

适用于