Sha256: 207f634136c30f1b531bb68e33f1dd6d925487fac783aee11874795e8934d5f6

Contents?: true

Size: 693 Bytes

Versions: 6

Compression:

Stored size: 693 Bytes

Contents

# TODO: Add more exceptions here

module Trumpet
  
  # Exception raised when the connection to the server fails
  class ServerConnectionError < StandardError; end
  
  # A generic exception to use until we have more specific exceptions
  # for everything
  class TrumpetError < StandardError; end
  
  # HTTP 400 Error
  class BadRequest < StandardError; end
  
  # HTTP 403 Error
  class Forbidden < StandardError; end
  
  # HTTP 404 Error
  class NotFound  < StandardError; end
  
  # HTTP 405 Error
  class MethodNotAllowed  < StandardError; end
  
  # HTTP 500 Error
  class InternalServerError  < StandardError; end
  
  # HTTP 501 Error
  class NotImplemented  < StandardError; end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trumpet-trumpet-0.0.1 lib/trumpet/exceptions.rb
trumpet-trumpet-0.0.2 lib/trumpet/exceptions.rb
trumpet-trumpet-0.0.3 lib/trumpet/exceptions.rb
trumpet-trumpet-0.0.4 lib/trumpet/exceptions.rb
trumpet-trumpet-0.0.5 lib/trumpet/exceptions.rb
trumpet-trumpet-0.0.6 lib/trumpet/exceptions.rb