Udostępnij przez


DeviceAlreadyExistsException Class

Definition

The exception that is thrown when an attempt is made to create a device that already exists in the hub.

[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
Inheritance
DeviceAlreadyExistsException
Attributes

Constructors

Name Description
DeviceAlreadyExistsException(ErrorCode, String, Exception)

Creates an instance of DeviceAlreadyExistsException with a specified ErrorCode, error message and an optional reference to the inner exception that caused this exception. This exception is marked as non-transient.

DeviceAlreadyExistsException(SerializationInfo, StreamingContext)

Creates an instance of DeviceAlreadyExistsException with the SerializationInfo and StreamingContext associated with the exception.

DeviceAlreadyExistsException(String, Exception)

Creates an instance of DeviceAlreadyExistsException with a specified error message and a reference to the inner exception that caused this exception, and marks it as non-transient.

DeviceAlreadyExistsException(String, String)

Creates an instance of DeviceAlreadyExistsException with the specified device Id and the service returned tracking Id associated with this particular error, and marks it as non-transient.

DeviceAlreadyExistsException(String)

Creates an instance of DeviceAlreadyExistsException with the specified device Id, an empty error message and marks it as non-transient.

Properties

Name Description
Code

The error code associated with the exception.

(Inherited from IotHubException)
IsTransient

Indicates if the error is transient and should be retried.

(Inherited from IotHubException)
TrackingId

The service returned tracking Id associated with this particular error.

(Inherited from IotHubException)

Methods

Name Description
GetObjectData(SerializationInfo, StreamingContext)

Sets the SerializationInfo with information about the exception. Use this to set IsTransient and TrackingId to the serialized object data.

(Inherited from IotHubException)

Applies to