Class PublishingError
Represents an error that occurred during message publishing.
public sealed class PublishingError
- Inheritance
-
PublishingError
- Inherited Members
- Extension Methods
Remarks
Creates a new publishing error.
Constructors
PublishingError(string, string, Exception?)
Represents an error that occurred during message publishing.
public PublishingError(string messageId, string error, Exception? exception = null)
Parameters
messageIdstringThe affected message ID, or an empty string for an operation-level infrastructure error without a known message.
errorstringThe error message.
exceptionExceptionThe exception that caused the failure.
Remarks
Creates a new publishing error.
Properties
Error
Gets the error message or exception details.
public string Error { get; init; }
Property Value
Exception
Gets the exception that caused the failure, if available.
public Exception? Exception { get; init; }
Property Value
MessageId
Gets the affected message ID, or an empty string when an operation-level error has no known message.
public string MessageId { get; init; }
Property Value
Timestamp
Gets the timestamp when the error occurred.
public DateTimeOffset Timestamp { get; init; }
Property Value
- DateTimeOffset
The current Timestamp value.
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.