Sha256: e929f800a9f61be35ae66f355d9f3f2436036a88afda34910a92edfc889ad75d

Contents?: true

Size: 605 Bytes

Versions: 1

Compression:

Stored size: 605 Bytes

Contents

module Simplenet
  module Exception
    class RetrieveError < StandardError
      def initialize(response)
        msg  = "Could not retrieve data from Simplenet. "
        msg += "Response code: #{response.code}. Error: #{response.body}"
        super msg
      end
    end

    class EntityNotFoundError < StandardError
      def initialize(msg)
        msg ||= "Entity not found on simplenet"
        super msg
      end
    end

    class DuplicatedEntryError < StandardError
      def initialize(msg)
        msg ||= "Entity already exists on simplenet"
        super msg
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simplenet-client-0.2.0 ./lib/simplenet/exception.rb