Sha256: c85dd2761e786620cb6b936f8eafe0721df28ca986f87f3eb62ac88c2a5d9e52

Contents?: true

Size: 764 Bytes

Versions: 26

Compression:

Stored size: 764 Bytes

Contents

module Octopi

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

  class APIError < StandardError
  end
  
  class InvalidLogin < StandardError
  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
  
  class ArgumentMustBeHash < Exception; end
  
  
  class NotFound < Exception
    def initialize(klass)
      super "The #{klass.to_s.split("::").last} you were looking for could not be found, or is private."
    end
  end
end

Version data entries

26 entries across 26 versions & 4 rubygems

Version Path
octopi-0.4.5 lib/octopi/error.rb
octopi-0.4.4 lib/octopi/error.rb
octopi-0.4.3 lib/octopi/error.rb
octopi-0.4.2 lib/octopi/error.rb
octopi-0.4.1 lib/octopi/error.rb
octopi-0.4.0 lib/octopi/error.rb
octopi-0.3.0 lib/octopi/error.rb
dcuddeback-octopi-0.2.12 lib/octopi/error.rb
dcuddeback-octopi-0.2.11 lib/octopi/error.rb
dcuddeback-octopi-0.2.9 lib/octopi/error.rb
dcuddeback-octopi-0.2.8 lib/octopi/error.rb
devver-octopi-0.2.14 lib/octopi/error.rb
tpitale-octopi-0.3.0 lib/octopi/error.rb
devver-octopi-0.2.13 lib/octopi/error.rb
devver-octopi-0.2.12 lib/octopi/error.rb
octopi-0.2.8 lib/octopi/error.rb
devver-octopi-0.2.11 lib/octopi/error.rb
devver-octopi-0.2.10 lib/octopi/error.rb
devver-octopi-0.2.9 lib/octopi/error.rb
devver-octopi-0.2.8 lib/octopi/error.rb