Exception: Plushie::ProtocolVersionMismatchError
- Defined in:
- lib/plushie.rb
Overview
Raised when the renderer's advertised protocol version differs from the version the SDK was built against. Carries both versions so callers can decide retry vs abort without string parsing.
Instance Attribute Summary collapse
-
#expected ⇒ Integer
readonly
Protocol version this SDK was built for.
-
#got ⇒ Integer?
readonly
Protocol version the renderer advertised.
Instance Method Summary collapse
-
#initialize(expected:, got:) ⇒ ProtocolVersionMismatchError
constructor
A new instance of ProtocolVersionMismatchError.
Constructor Details
#initialize(expected:, got:) ⇒ ProtocolVersionMismatchError
Returns a new instance of ProtocolVersionMismatchError.
138 139 140 141 142 |
# File 'lib/plushie.rb', line 138 def initialize(expected:, got:) super("protocol version mismatch: expected #{expected}, got #{got.inspect}") @expected = expected @got = got end |
Instance Attribute Details
#expected ⇒ Integer (readonly)
Returns protocol version this SDK was built for.
134 135 136 |
# File 'lib/plushie.rb', line 134 def expected @expected end |
#got ⇒ Integer? (readonly)
Returns protocol version the renderer advertised.
136 137 138 |
# File 'lib/plushie.rb', line 136 def got @got end |