Class: Serf::Messages::CaughtExceptionEvent
- Inherits:
-
Object
- Object
- Serf::Messages::CaughtExceptionEvent
- Includes:
- Serf::Message, Util::Uuidable
- Defined in:
- lib/serf/messages/caught_exception_event.rb
Overview
An event message to signal that the serf code caught an exception during the processing of some message, which is represented by the context field.
Instances of this class are norminally published to an error channel for out of band processing/notification.
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#error_backtrace ⇒ Object
Returns the value of attribute error_backtrace.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(options = {}) ⇒ CaughtExceptionEvent
constructor
A new instance of CaughtExceptionEvent.
- #to_s ⇒ Object
Methods included from Util::Uuidable
Methods included from Serf::Message
#kind, #to_hash, #to_json, #to_msgpack
Constructor Details
#initialize(options = {}) ⇒ CaughtExceptionEvent
Returns a new instance of CaughtExceptionEvent.
23 24 25 26 27 28 |
# File 'lib/serf/messages/caught_exception_event.rb', line 23 def initialize(={}) @context = [:context] @error_message = [:error_message] @error_backtrace = [:error_backtrace] @uuid = [:uuid] end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
19 20 21 |
# File 'lib/serf/messages/caught_exception_event.rb', line 19 def context @context end |
#error_backtrace ⇒ Object
Returns the value of attribute error_backtrace.
21 22 23 |
# File 'lib/serf/messages/caught_exception_event.rb', line 21 def error_backtrace @error_backtrace end |
#error_message ⇒ Object
Returns the value of attribute error_message.
20 21 22 |
# File 'lib/serf/messages/caught_exception_event.rb', line 20 def @error_message end |
Instance Method Details
#attributes ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/serf/messages/caught_exception_event.rb', line 30 def attributes { 'context' => @context, 'error_message' => @error_message, 'error_backtrace' => @error_backtrace, 'uuid' => uuid } end |
#to_s ⇒ Object
39 40 41 |
# File 'lib/serf/messages/caught_exception_event.rb', line 39 def to_s to_hash.to_s end |