class Mongo::Error::InvalidServerPreference
Raised when an invalid server preference is provided.
@since 2.0.0
Constants
- INVALID_MAX_STALENESS
Error message for when the max staleness is not at least twice the heartbeat frequency.
@since 2.4.0
- NO_MAX_STALENESS_SUPPORT
Error message when a max staleness is specified for a read preference that cannot support it.
@since 2.4.0
- NO_MAX_STALENESS_WITH_LEGACY_SERVER
Error message when max staleness cannot be used because one or more servers has version < 3.4.
@since 2.4.0
- NO_TAG_SUPPORT
Error message when tags are specified for a read preference that cannot support them.
@since 2.4.0
Public Class Methods
new(message)
click to toggle source
Instantiate the new exception.
@example Instantiate the exception.
Mongo::Error::InvalidServerPreference.new
@param [ String ] message The error message.
@since 2.0.0
Calls superclass method
Mongo::Error.new
# File lib/mongo/error/invalid_server_preference.rb, line 54 def initialize(message) super(message) end