Sha256: f7420ae070799be39721057e2900693546a61fd20b97d38594091c03e469f1c8

Contents?: true

Size: 1010 Bytes

Versions: 12

Compression:

Stored size: 1010 Bytes

Contents

class Shutl::Resource::Error < ::IOError
  attr_reader :body, :status

  def initialize body, status
    @body, @status = body, status
  end
end

# This NoQuotesGenerated is shutl specific corresponding to HTTP status 299.
# The correct solution to this would be to remove this exception from the gem
# and handle specifically in a QuoteCollection resource in for example the
# 'shutl' gem.
unless Shutl.const_defined?('NoQuotesGenerated')
  Shutl::NoQuotesGenerated  = Class.new Shutl::Resource::Error
  Shutl::BadRequest         = Class.new Shutl::Resource::Error
  Shutl::ForbiddenAccess    = Class.new Shutl::Resource::Error
  Shutl::ResourceNotFound   = Class.new Shutl::Resource::Error
  Shutl::ResourceConflict   = Class.new Shutl::Resource::Error
  Shutl::ResourceGone       = Class.new Shutl::Resource::Error
  Shutl::ResourceInvalid    = Class.new Shutl::Resource::Error
  Shutl::ServerError        = Class.new Shutl::Resource::Error
  Shutl::ServiceUnavailable = Class.new Shutl::Resource::Error
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
shutl_resource-2.0.2 lib/shutl/resource/errors.rb
shutl_resource-2.0.1 lib/shutl/resource/errors.rb
shutl_resource-2.0.0 lib/shutl/resource/errors.rb
shutl_resource-1.9.1 lib/shutl/resource/errors.rb
shutl_resource-1.9.0 lib/shutl/resource/errors.rb
shutl_resource-1.8.2 lib/shutl/resource/errors.rb
shutl_resource-1.8.0 lib/shutl/resource/errors.rb
shutl_resource-1.7.3 lib/shutl/resource/errors.rb
shutl_resource-1.7.2 lib/shutl/resource/errors.rb
shutl_resource-1.7.1 lib/shutl/resource/errors.rb
shutl_resource-1.7.0 lib/shutl/resource/errors.rb
shutl_resource-1.6.0 lib/shutl/resource/errors.rb