Exception: Plushie::Transport::BufferOverflowError
- Inherits:
-
StandardError
- Object
- StandardError
- Plushie::Transport::BufferOverflowError
- 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
-
#limit ⇒ Integer
readonly
Configured cap in bytes.
-
#size ⇒ Integer
readonly
Offending frame size in bytes.
Instance Method Summary collapse
-
#initialize(size:, limit:) ⇒ BufferOverflowError
constructor
A new instance of BufferOverflowError.
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
#limit ⇒ Integer (readonly)
Returns configured cap in bytes.
13 14 15 |
# File 'lib/plushie/transport/framing.rb', line 13 def limit @limit end |
#size ⇒ Integer (readonly)
Returns offending frame size in bytes.
11 12 13 |
# File 'lib/plushie/transport/framing.rb', line 11 def size @size end |