Exception: BreakerMachines::CircuitOpenError
- Defined in:
- lib/breaker_machines/errors.rb
Overview
Raised when attempting to use a circuit that is in the open state
Direct Known Subclasses
Instance Attribute Summary collapse
-
#circuit_name ⇒ Object
readonly
Returns the value of attribute circuit_name.
-
#opened_at ⇒ Object
readonly
Returns the value of attribute opened_at.
Instance Method Summary collapse
-
#initialize(circuit_name, opened_at = nil) ⇒ CircuitOpenError
constructor
A new instance of CircuitOpenError.
Constructor Details
#initialize(circuit_name, opened_at = nil) ⇒ CircuitOpenError
Returns a new instance of CircuitOpenError.
10 11 12 13 14 |
# File 'lib/breaker_machines/errors.rb', line 10 def initialize(circuit_name, opened_at = nil) @circuit_name = circuit_name @opened_at = opened_at super("Circuit '#{circuit_name}' is open") end |
Instance Attribute Details
#circuit_name ⇒ Object (readonly)
Returns the value of attribute circuit_name.
8 9 10 |
# File 'lib/breaker_machines/errors.rb', line 8 def circuit_name @circuit_name end |
#opened_at ⇒ Object (readonly)
Returns the value of attribute opened_at.
8 9 10 |
# File 'lib/breaker_machines/errors.rb', line 8 def opened_at @opened_at end |