Table of Contents

Class MessagingException

Namespace
Microsoft.ServiceBus.Messaging
Assembly
Microsoft.ServiceBus.dll

Represents the exception that is thrown for signaling messaging errors.

public class MessagingException : Exception, ISerializable
Inheritance
MessagingException
Implements
Derived
Inherited Members

Constructors

MessagingException(SerializationInfo, StreamingContext)

Initializes a new instance of the MessagingException class with serialization information and streaming context.

protected MessagingException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The serialization information.

context StreamingContext

The streaming context.

MessagingException(string)

Initializes a new instance of the MessagingException class with a specified error message.

public MessagingException(string message)

Parameters

message string

The error message that explains the reason for the exception.

MessagingException(string, bool, Exception)

Initializes a new instance of the MessagingException class.

public MessagingException(string message, bool isTransientError, Exception innerException)

Parameters

message string

The error message that explains the reason for the exception.

isTransientError bool

true if the exception is transient; otherwise, false.

innerException Exception

The exception that is the cause of the current exception.

MessagingException(string, Exception)

Initializes a new instance of the MessagingException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public MessagingException(string message, Exception innerException)

Parameters

message string

The error message that explains the reason for the exception.

innerException Exception

The exception that is the cause of the current exception.

Properties

Data

Gets the data associated with the exception.

public override sealed IDictionary Data { get; }

Property Value

IDictionary

The data associated with the exception.

Detail

Gets or sets the detail information of the messaging exception.

public MessagingExceptionDetail Detail { get; }

Property Value

MessagingExceptionDetail

The detail information of the messaging exception.

IsTransient

Gets or sets a value indicating whether the exception is transient. Check this property to determine if the operation should be retried.

public bool IsTransient { get; protected set; }

Property Value

bool

true if the exception is transient; otherwise, false.

Timestamp

Gets or sets the time at which the messaging exception occurred.

public DateTime Timestamp { get; }

Property Value

DateTime

The time at which the messaging exception occurred.

Methods

GetObjectData(SerializationInfo, StreamingContext)

Populates the serialization information with data about the exception.

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The serialized object data about the exception being thrown.

context StreamingContext

The contextual information about the source or destinations.