Exception: Mongo::Error::InvalidServerPreference
- Inherits:
-
Mongo::Error
- Object
- StandardError
- Mongo::Error
- Mongo::Error::InvalidServerPreference
- Defined in:
- lib/mongo/error/invalid_server_preference.rb
Overview
Raised when an invalid server preference is provided.
Constant Summary collapse
- NO_TAG_SUPPORT =
Error message when tags are specified for a read preference that cannot support them.
'This read preference cannot be combined with tags.'- NO_MAX_STALENESS_SUPPORT =
Error message when a max staleness is specified for a read preference that cannot support it.
'max_staleness cannot be set for this read preference.'- NO_HEDGE_SUPPORT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Error message when hedge is specified for a read preference that does not support it.
'The hedge option cannot be set for this read preference'- INVALID_MAX_STALENESS =
Deprecated.
Error message for when the max staleness is not at least twice the heartbeat frequency.
'`max_staleness` value is too small. It must be at least ' + "`ServerSelector::SMALLEST_MAX_STALENESS_SECONDS` and (the cluster's heartbeat_frequency " + 'setting + `Cluster::IDLE_WRITE_PERIOD_SECONDS`).'
Constants inherited from Mongo::Error
BAD_VALUE, CODE, CURSOR_NOT_FOUND, ERRMSG, TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_ERROR, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL, WRITE_CONCERN_ERROR, WRITE_CONCERN_ERRORS, WRITE_ERRORS
Instance Attribute Summary
Attributes included from Notable
#connection_global_id, #generation, #service_id
Instance Method Summary collapse
-
#initialize(message) ⇒ InvalidServerPreference
constructor
Instantiate the new exception.
Methods inherited from Mongo::Error
#change_stream_resumable?, #network_error?, #write_concern_error_label?, #write_concern_error_labels
Methods included from ChangeStreamResumable
Methods included from WriteRetryable
Methods included from Labelable
Methods included from Notable
#add_note, #add_notes, #notes, #to_s
Constructor Details
#initialize(message) ⇒ InvalidServerPreference
Instantiate the new exception.
54 55 56 |
# File 'lib/mongo/error/invalid_server_preference.rb', line 54 def initialize() super end |