Exception: BreakerMachines::CircuitOpenError

Inherits:
Error
  • Object
show all
Defined in:
lib/breaker_machines/errors.rb

Overview

Raised when attempting to use a circuit that is in the open state

Direct Known Subclasses

CircuitDependencyError

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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_atObject (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