Exception: Raif::Errors::StreamingError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/raif/errors/streaming_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message:, type:, event:, code: nil) ⇒ StreamingError

Returns a new instance of StreamingError.



8
9
10
11
12
13
14
# File 'lib/raif/errors/streaming_error.rb', line 8

def initialize(message:, type:, event:, code: nil)
  super(message)

  @type = type
  @code = code
  @event = event
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



6
7
8
# File 'lib/raif/errors/streaming_error.rb', line 6

def code
  @code
end

#eventObject (readonly)

Returns the value of attribute event.



6
7
8
# File 'lib/raif/errors/streaming_error.rb', line 6

def event
  @event
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/raif/errors/streaming_error.rb', line 6

def type
  @type
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/raif/errors/streaming_error.rb', line 16

def to_s
  "[#{type}] #{super} (code=#{code}, event=#{event})"
end