Delen via


IotHubException Class

Definition

The exception thrown when the client receives an error while communicating with IoT hub service.

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

Constructors

IotHubException(ErrorCode, String, Boolean, Exception)

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

IotHubException(ErrorCode, String, Exception)

Creates an instance of IotHubException 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.

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 SerializationInfo and 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

Code

The error code associated with the exception.

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 SerializationInfo with information about the exception. Use this to set IsTransient and TrackingId to the serialized object data.

Applies to