Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    Exception
    AkkaException
    PayloadSizeExceededException
    Implements
    ISerializable
    Inherited Members
    AkkaException.Cause
    Exception.GetBaseException()
    Exception.GetType()
    Exception.ToString()
    Exception.Data
    Exception.HelpLink
    Exception.HResult
    Exception.InnerException
    Exception.Message
    Exception.Source
    Exception.StackTrace
    Exception.TargetSite
    Exception.SerializeObjectState
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Akka.Serialization
    Assembly: Akka.dll
    Syntax
    public class PayloadSizeExceededException : AkkaException, ISerializable

    Constructors

    | Edit this page View Source

    PayloadSizeExceededException()

    Initializes a new instance of the PayloadSizeExceededException class.

    Declaration
    public PayloadSizeExceededException()
    | Edit this page View Source

    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.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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 Source

    AttemptedSize

    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
    | Edit this page View Source

    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 Source

    GetObjectData(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
    Exception.GetObjectData(SerializationInfo, StreamingContext)
    Exceptions
    Type Condition
    ArgumentNullException

    The info parameter is a null reference (Nothing in Visual Basic).

    Implements

    ISerializable

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET