Class: Strobe::ExceptionNotifier
- Inherits:
-
Object
- Object
- Strobe::ExceptionNotifier
- Defined in:
- lib/strobe/exception_notifier.rb
Class Attribute Summary collapse
-
.enabled ⇒ Object
(also: enabled?)
Returns the value of attribute enabled.
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(e, options = {}) ⇒ ExceptionNotifier
constructor
A new instance of ExceptionNotifier.
- #notify ⇒ Object
Constructor Details
#initialize(e, options = {}) ⇒ ExceptionNotifier
Returns a new instance of ExceptionNotifier.
19 20 21 22 23 24 |
# File 'lib/strobe/exception_notifier.rb', line 19 def initialize(e, = {}) @exception = e @options = extract_action end |
Class Attribute Details
.enabled ⇒ Object Also known as: enabled?
Returns the value of attribute enabled.
4 5 6 |
# File 'lib/strobe/exception_notifier.rb', line 4 def enabled @enabled end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
17 18 19 |
# File 'lib/strobe/exception_notifier.rb', line 17 def action @action end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
17 18 19 |
# File 'lib/strobe/exception_notifier.rb', line 17 def exception @exception end |
Class Method Details
Instance Method Details
#notify ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/strobe/exception_notifier.rb', line 26 def notify params = { :error_class => error_class, :error_message => , :strobe_action => action, :parameters => parameters, :backtrace => exception.backtrace.join("\n") } Strobe.connection.post "/errors", params end |