MessagingException MessagingException Class

Represents the exception that is thrown for signaling messaging errors.

Syntax

Declaration

[Serializable]
public class MessagingException : Exception, ISerializable, _Exception<Serializable>
Public Class MessagingException
    Inherits Exception
    Implements ISerializable, _Exception

Inheritance Hierarchy

Constructors summary

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

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

Initializes a new instance of the MessagingException class.

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.

Properties summary

Gets the data associated with the exception.

Gets or sets the detail information of the messaging exception.

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

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

Methods summary

Populates the serialization information with data about the exception.

Constructors

  • MessagingException(SerializationInfo, StreamingContext)
    MessagingException(SerializationInfo, StreamingContext)

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

    protected MessagingException(SerializationInfo info, StreamingContext context)Protected Sub New(info As SerializationInfo, context As StreamingContext)

    Parameters

  • MessagingException(String)
    MessagingException(String)

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

    public MessagingException(string message)Public Sub New(message As String)

    Parameters

    • message

      The error message that explains the reason for the exception.

  • MessagingException(String, Boolean, Exception)
    MessagingException(String, Boolean, Exception)

    Initializes a new instance of the MessagingException class.

    public MessagingException(string message, bool isTransientError, Exception innerException)Public Sub New(message As String, isTransientError As Boolean, innerException As Exception)

    Parameters

    • message

      The error message that explains the reason for the exception.

    • isTransientError

      true if the exception is transient; otherwise, false.

    • innerException

      The exception that is the cause of the current exception.

  • MessagingException(String, 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)Public Sub New(message As String, innerException As Exception)

    Parameters

    • message

      The error message that explains the reason for the exception.

    • innerException

      The exception that is the cause of the current exception.

Properties

  • Data
    Data

    Gets the data associated with the exception.

    public override sealed IDictionary Data { get; }Public NotOverridable Overrides ReadOnly Property Data As IDictionary

    Property Value

  • Detail
    Detail

    Gets or sets the detail information of the messaging exception.

    public MessagingExceptionDetail Detail { get; }Public ReadOnly Property Detail As MessagingExceptionDetail

    Property Value

  • IsTransient
    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; }Public Property IsTransient As Boolean

    Property Value

    • true if the exception is transient; otherwise, false.

  • Timestamp
    Timestamp

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

    public DateTime Timestamp { get; }Public ReadOnly Property Timestamp As Date

    Property Value

Methods

  • GetObjectData(SerializationInfo, StreamingContext)
    GetObjectData(SerializationInfo, StreamingContext)

    Populates the serialization information with data about the exception.

    public override void GetObjectData(SerializationInfo info, StreamingContext context)Public Overrides Sub GetObjectData(info As SerializationInfo, context As StreamingContext)

    Parameters

Details

Assembly

Microsoft.ServiceBus.dll