Exception: Mongoid::Errors::UnsupportedVersion

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/mongoid/errors.rb

Overview

Raised when the database version is not supported by Mongoid.

Example:

UnsupportedVersion.new(Mongo::ServerVersion.new("1.3.1"))

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ UnsupportedVersion

Returns a new instance of UnsupportedVersion.



50
51
52
# File 'lib/mongoid/errors.rb', line 50

def initialize(version)
  @version = version
end

Instance Method Details

#messageObject



53
54
55
# File 'lib/mongoid/errors.rb', line 53

def message
  "MongoDB #{@version} not supported, please upgrade to #{Mongoid::MONGODB_VERSION}"
end