Class PayloadSizeExceededException
Thrown when a write to a PooledPayloadWriter -- via GetSpan(int),
GetMemory(int), or Advance(int) -- would push the
writer's total written byte count past its configured maxCapacity.
This is deliberate groundwork for deterministic oversized-payload failure (messagepack-sourcegen task 6.8): an oversized payload fails HERE, at encode time, with a typed exception carrying the attempted size and the configured cap -- it is never discovered downstream as a corrupt or truncated wire frame.
Implements
Inherited Members
Namespace: Akka.Serialization
Assembly: Akka.dll
Syntax
public class PayloadSizeExceededException : AkkaException, ISerializable
Constructors
| Edit this page View SourcePayloadSizeExceededException()
Initializes a new instance of the PayloadSizeExceededException class.
Declaration
public PayloadSizeExceededException()
PayloadSizeExceededException(long, int)
Initializes a new instance of the PayloadSizeExceededException class.
Declaration
public PayloadSizeExceededException(long attemptedSize, int maxCapacity)
Parameters
| Type | Name | Description |
|---|---|---|
| long | attemptedSize | The total byte count that would have resulted had the write been allowed. |
| int | maxCapacity | The configured maximum capacity, in bytes. |
PayloadSizeExceededException(SerializationInfo, StreamingContext)
Initializes a new instance of the PayloadSizeExceededException class.
Declaration
protected PayloadSizeExceededException(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializationInfo | info | The SerializationInfo that holds the serialized object data about the exception being thrown. |
| StreamingContext | context | The StreamingContext that contains contextual information about the source or destination. |
PayloadSizeExceededException(string, Exception?)
Initializes a new instance of the PayloadSizeExceededException class.
Declaration
public PayloadSizeExceededException(string message, Exception? cause = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message that describes the error. |
| Exception | cause | The exception that is the cause of the current exception. |
Properties
| Edit this page View SourceAttemptedSize
The total byte count (already-written bytes plus the rejected request) that would have resulted had the write been allowed.
Declaration
public long AttemptedSize { get; }
Property Value
| Type | Description |
|---|---|
| long |
MaxCapacity
The configured maximum capacity, in bytes, that AttemptedSize would have exceeded.
Declaration
public int MaxCapacity { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceGetObjectData(SerializationInfo, StreamingContext)
When overridden in a derived class, sets the SerializationInfo with information about the exception.
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializationInfo | info | The SerializationInfo that holds the serialized object data about the exception being thrown. |
| StreamingContext | context | The StreamingContext that contains contextual information about the source or destination. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | The |
Edit this page