Class: Sqreen::RemoteException
- Defined in:
- lib/sqreen/events/remote_exception.rb
Overview
When an exception arise it is automatically pushed to the event queue
Instance Attribute Summary
Attributes inherited from Event
Class Method Summary collapse
Instance Method Summary collapse
- #enqueue ⇒ Object
-
#initialize(payload_or_exception) ⇒ RemoteException
constructor
A new instance of RemoteException.
- #klass ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(payload_or_exception) ⇒ RemoteException
Returns a new instance of RemoteException.
17 18 19 20 21 22 23 24 |
# File 'lib/sqreen/events/remote_exception.rb', line 17 def initialize(payload_or_exception) payload = if payload_or_exception.is_a?(Hash) payload_or_exception else { 'exception' => payload_or_exception } end super(payload) end |
Class Method Details
.record(payload_or_exception) ⇒ Object
12 13 14 15 |
# File 'lib/sqreen/events/remote_exception.rb', line 12 def self.record(payload_or_exception) exception = RemoteException.new(payload_or_exception) exception.enqueue end |