Exception: Plushie::Transport::BufferOverflowError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/plushie/transport/framing.rb

Overview

Raised when a wire frame exceeds the protocol's per-message size cap (64 MiB). Carries both the offending size and the configured cap so callers can respond without string parsing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(size:, limit:) ⇒ BufferOverflowError

Returns a new instance of BufferOverflowError.



15
16
17
18
19
# File 'lib/plushie/transport/framing.rb', line 15

def initialize(size:, limit:)
  super("wire frame of #{size} bytes exceeds #{limit} byte limit")
  @size = size
  @limit = limit
end

Instance Attribute Details

#limitInteger (readonly)

Returns configured cap in bytes.

Returns:

  • (Integer)

    configured cap in bytes.



13
14
15
# File 'lib/plushie/transport/framing.rb', line 13

def limit
  @limit
end

#sizeInteger (readonly)

Returns offending frame size in bytes.

Returns:

  • (Integer)

    offending frame size in bytes.



11
12
13
# File 'lib/plushie/transport/framing.rb', line 11

def size
  @size
end