Sha256: b1d58e588cf6ce9fe3a7c7a064be143506fd868eaf076c5588b09c932cfa9771

Contents?: true

Size: 788 Bytes

Versions: 4

Compression:

Stored size: 788 Bytes

Contents

module Dolly
  class ResourceNotFound < RuntimeError
    def to_s
      'The document was not found.'
    end
  end
  class ServerError < RuntimeError
    def initialize msg
      @msg = msg
    end

    def to_s
      "There has been an error on the couchdb server: #{@msg.inspect}"
    end
  end
  class MissingDesignError < RuntimeError
    def to_s
      'Design document is missing. Add it into couchdb.yml as design:name.'
    end
  end
  class InvalidConfigFileError < RuntimeError

    def initialize filename
      @filename = filename
    end

    def to_s
      "Invalid config file at #{filename}"
    end
  end
  class InvalidProperty < RuntimeError
    def to_s
      "Trying to set an undefined property."
    end
  end
  class DocumentInvalidError < RuntimeError; end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dolly-1.1.1 lib/exceptions/dolly.rb
dolly-1.1.0 lib/exceptions/dolly.rb
dolly-1.0.1 lib/exceptions/dolly.rb
dolly-1.0.0 lib/exceptions/dolly.rb