Class: Consumer::Controls::Handle::RaiseError::Example

Inherits:
Object
  • Object
show all
Includes:
Messaging::Handle
Defined in:
lib/consumer/controls/handle/raise_error.rb

Instance Method Summary collapse

Instance Method Details

#handle(message_data) ⇒ Object

Raises:



8
9
10
11
12
# File 'lib/consumer/controls/handle/raise_error.rb', line 8

def handle(message_data)
  error_text = "Example error (Message: #{message_data.type}, Stream: #{message_data.stream_name}, Position: #{message_data.position}, Global Position: #{message_data.global_position})"

  raise Error::Example, error_text
end