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

DeviceAlreadyExistsException 类

定义

尝试创建中心中已存在的设备时引发的异常。

[System.Serializable]
public sealed class DeviceAlreadyExistsException : Microsoft.Azure.Devices.Common.Exceptions.IotHubException
[<System.Serializable>]
type DeviceAlreadyExistsException = class
    inherit IotHubException
Public NotInheritable Class DeviceAlreadyExistsException
Inherits IotHubException
继承
DeviceAlreadyExistsException
属性

构造函数

DeviceAlreadyExistsException(ErrorCode, String, Exception)

创建具有指定 ErrorCode、错误消息和对导致此异常的内部异常的可选引用的 实例DeviceAlreadyExistsException。 此异常标记为非暂时性。

DeviceAlreadyExistsException(SerializationInfo, StreamingContext)

创建与 SerializationInfo 异常关联的 和 StreamingContext 的实例DeviceAlreadyExistsException

DeviceAlreadyExistsException(String)

创建具有指定设备 ID、空错误消息的 DeviceAlreadyExistsException 实例,并将其标记为非暂时性。

DeviceAlreadyExistsException(String, Exception)

创建具有指定错误消息和对导致此异常的内部异常的引用的 实例 DeviceAlreadyExistsException ,并将其标记为非暂时性。

DeviceAlreadyExistsException(String, String)

创建具有指定设备 ID 且服务返回与此特定错误关联的跟踪 ID 的实例 DeviceAlreadyExistsException ,并将其标记为非暂时性。

属性

Code

与异常关联的错误代码。

(继承自 IotHubException)
IsTransient

指示错误是否为暂时性错误,应重试。

(继承自 IotHubException)
TrackingId

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

(继承自 IotHubException)

方法

GetObjectData(SerializationInfo, StreamingContext)

使用关于异常的信息设置 SerializationInfo。 使用此项可对序列化对象数据设置 IsTransientTrackingId

(继承自 IotHubException)

适用于