Exception: Breakers::OutageException
- Inherits:
-
StandardError
- Object
- StandardError
- Breakers::OutageException
- Defined in:
- lib/breakers/outage_exception.rb
Overview
The error that is raised when a request is made against a service that is experiencing an outage
Instance Attribute Summary collapse
-
#outage ⇒ Object
readonly
Returns the value of attribute outage.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
-
#initialize(outage, service) ⇒ OutageException
constructor
A new instance of OutageException.
- #message ⇒ Object
Constructor Details
#initialize(outage, service) ⇒ OutageException
Returns a new instance of OutageException.
8 9 10 11 |
# File 'lib/breakers/outage_exception.rb', line 8 def initialize(outage, service) @outage = outage @service = service end |
Instance Attribute Details
#outage ⇒ Object (readonly)
Returns the value of attribute outage.
5 6 7 |
# File 'lib/breakers/outage_exception.rb', line 5 def outage @outage end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
6 7 8 |
# File 'lib/breakers/outage_exception.rb', line 6 def service @service end |
Instance Method Details
#message ⇒ Object
13 14 15 |
# File 'lib/breakers/outage_exception.rb', line 13 def "Outage detected on #{@service.name} beginning at #{@outage.start_time.to_i}" end |