Sha256: 5ce40c3584006ccff89a3dc39f4eaf3f44207f95cc4faa04484dab19c6fd2c1d

Contents?: true

Size: 422 Bytes

Versions: 10

Compression:

Stored size: 422 Bytes

Contents

module Breakers
  # The error that is raised when a request is made against a service that is
  # experiencing an outage
  class OutageException < StandardError
    attr_reader :outage
    attr_reader :service

    def initialize(outage, service)
      @outage = outage
      @service = service
    end

    def message
      "Outage detected on #{@service.name} beginning at #{@outage.start_time.to_i}"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
breakers-0.7.1 lib/breakers/outage_exception.rb
breakers-0.6.0 lib/breakers/outage_exception.rb
breakers-0.5.0 lib/breakers/outage_exception.rb
breakers-0.4.0 lib/breakers/outage_exception.rb
breakers-0.3.0 lib/breakers/outage_exception.rb
breakers-0.2.4 lib/breakers/outage_exception.rb
breakers-0.2.3 lib/breakers/outage_exception.rb
breakers-0.2.2 lib/breakers/outage_exception.rb
breakers-0.2.1 lib/breakers/outage_exception.rb
breakers-0.2.0 lib/breakers/outage_exception.rb