Sha256: 6526a4aa8903c806612cde236c70d8b94add69087f54b7399ef4a13d1ed4ae82

Contents?: true

Size: 530 Bytes

Versions: 18

Compression:

Stored size: 530 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc
  module Errors #:nodoc

    # Raised when the database connection has not been set up properly, either
    # by attempting to set an object on the db that is not a +Mongo::DB+, or
    # not setting anything at all.
    #
    # Example:
    #
    # <tt>InvalidDatabase.new("Not a DB")</tt>
    class InvalidDatabase < MongoidError
      def initialize(database)
        super(
          translate("invalid_database", { :name => database.class.name })
        )
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
mongoid-braxton-2.0.2 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.2 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.1 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.rc.8 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.rc.7 lib/mongoid/errors/invalid_database.rb
stonegao-mongoid-2.0.0.rc.6 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.rc.6 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.rc.5 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.rc.4 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.rc.3 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.rc.2 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.rc.1 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.beta.20 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.beta.19 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.beta.18 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.beta.17 lib/mongoid/errors/invalid_database.rb
mongoid-2.0.0.beta.16 lib/mongoid/errors/invalid_database.rb