Exception: StompOut::ProtocolError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/stomp_out/errors.rb

Overview

Exception for STOMP protocol violations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, frame = nil, headers = nil) ⇒ ProtocolError

Create exception

Parameters:

  • message (String)

    describing error

  • frame (Frame, NilClass) (defaults to: nil)

    that caused error

  • headers (Hash, NilClass) (defaults to: nil)

    to be included in an ERROR response



41
42
43
44
45
# File 'lib/stomp_out/errors.rb', line 41

def initialize(message, frame = nil, headers = nil)
  @frame = frame
  @headers = headers || {}
  super(message)
end

Instance Attribute Details

#frameObject (readonly)

Frame, NilClass

Frame for which error occurred



34
35
36
# File 'lib/stomp_out/errors.rb', line 34

def frame
  @frame
end

#headersObject (readonly)

Hash

Headers to be included in an ERROR response



28
29
30
# File 'lib/stomp_out/errors.rb', line 28

def headers
  @headers
end

#receiptObject (readonly)

String, NilClass

Contents of “receipt” header in frame causing error



31
32
33
# File 'lib/stomp_out/errors.rb', line 31

def receipt
  @receipt
end