Sha256: 2017cde9cadf1486eee3625189e1f748af3a915e473d80999928420787a4dd61

Contents?: true

Size: 491 Bytes

Versions: 9

Compression:

Stored size: 491 Bytes

Contents

module Octopi

  class FormatError < StandardError
   def initialize(f)
     $stderr.puts "Got unexpected format (got #{f.first} for #{f.last})"
   end
  end 

  class APIError < StandardError
   def initialize(m)
     $stderr.puts m 
   end
  end

  class RetryableAPIError < RuntimeError
    attr_reader :code
    def initialize(code=nil)
      @code = code.nil? ? '???' : code
      @message = "GitHub returned status #{@code}. Retrying request."
      super @message
    end  
  end
end

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
ddollar-octopi-0.0.13 lib/octopi/error.rb
fcoury-octopi-0.0.11 lib/octopi/error.rb
fcoury-octopi-0.0.8 lib/octopi/error.rb
fcoury-octopi-0.0.9 lib/octopi/error.rb
fcoury-octopi-0.1.0 lib/octopi/error.rb
philnash-octopi-0.0.11 lib/octopi/error.rb
philnash-octopi-0.0.12 lib/octopi/error.rb
octopi-0.1.0 lib/octopi/error.rb
octopi-0.0.9 lib/octopi/error.rb