Share via


IotHubException Class

Definition

The exception that is thrown when an error occurs during DeviceClient or ModuleClient operation.

[System.Serializable]
public class IotHubException : Exception
[<System.Serializable>]
type IotHubException = class
    inherit Exception
Public Class IotHubException
Inherits Exception
Inheritance
System.Exception
IotHubException
Derived
Attributes
System.SerializableAttribute

Constructors

IotHubException()

Creates an instance of IotHubException an empty error message.

IotHubException(Exception)

Creates an instance of IotHubException with an empty error message and a reference to the inner exception that caused this exception.

IotHubException(SerializationInfo, StreamingContext)

Creates an instance of IotHubException with the System.Runtime.Serialization.SerializationInfo and System.Runtime.Serialization.StreamingContext associated with the exception.

IotHubException(String, Boolean, String)

Creates an instance of IotHubException with the supplied error message, tracking Id and a flag indicating if the error was transient.

IotHubException(String, Boolean)

Creates an instance of IotHubException with the supplied error message and a flag indicating if the error was transient.

IotHubException(String, Exception, Boolean, String)

Creates an instance of IotHubException with a specified error message, a reference to the inner exception that caused this exception, a flag indicating if the error was transient and the service returned tracking Id associated with this particular error.

IotHubException(String, Exception, Boolean)

Creates an instance of IotHubException with a specified error message, a reference to the inner exception that caused this exception and a flag indicating if the error was transient.

IotHubException(String, Exception)

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

IotHubException(String, String)

Creates an instance of IotHubException with the supplied error message and tracking Id, and marks it as non-transient.

IotHubException(String)

Creates an instance of IotHubException with the supplied error message and marks it as non-transient.

Properties

IsTransient

Indicates if the error is transient and should be retried.

TrackingId

The service returned tracking Id associated with this particular error.

Methods

GetObjectData(SerializationInfo, StreamingContext)

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

Applies to