Sha256: 674a288b259e7baac660f9b3974e73031930e65cf741782c6919dba46ea12942

Contents?: true

Size: 648 Bytes

Versions: 8

Compression:

Stored size: 648 Bytes

Contents

module Hamburglar
  # Raised when trying to assign an invalid gateway to Hamburglar.gateway
  class InvalidGateway < StandardError
    def initialize(gateway = nil)
      msg = "Invalid gateway"
      msg << ", #{gateway}" if gateway
      super msg
    end
  end

  # Raised when trying to assign an invalid gateway URL
  class InvalidURL < StandardError
    def initialize(url = nil)
      msg = "Invalid url"
      msg << ", #{url}" if url
      super msg
    end
  end

  # Raised if Hamburglar::Gateways::Base.validate! fails
  class InvalidRequest < StandardError
    def initialize(msg = nil)
      super "Invalid request"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hamburglar-0.3.0 lib/hamburglar/errors.rb
hamburglar-0.2.0 lib/hamburglar/errors.rb
hamburglar-0.1.5 lib/hamburglar/errors.rb
hamburglar-0.1.4 lib/hamburglar/errors.rb
hamburglar-0.1.3 lib/hamburglar/errors.rb
hamburglar-0.1.2 lib/hamburglar/errors.rb
hamburglar-0.1.1 lib/hamburglar/errors.rb
hamburglar-0.1.0 lib/hamburglar/errors.rb