Exception: Mongo::Auth::InvalidMechanism
- Inherits:
-
InvalidConfiguration
- Object
- RuntimeError
- Error::AuthError
- InvalidConfiguration
- Mongo::Auth::InvalidMechanism
- Defined in:
- build/ruby-driver-v2.19/lib/mongo/auth.rb
Overview
Raised when trying to get an invalid authorization mechanism.
Instance Attribute Summary
Attributes included from Error::Notable
#connection_global_id, #generation, #service_id
Instance Method Summary collapse
-
#initialize(mechanism) ⇒ InvalidMechanism
constructor
Instantiate the new error.
Methods included from Error::Notable
#add_note, #add_notes, #notes, #to_s
Constructor Details
#initialize(mechanism) ⇒ InvalidMechanism
Instantiate the new error.
121 122 123 124 125 126 |
# File 'build/ruby-driver-v2.19/lib/mongo/auth.rb', line 121 def initialize(mechanism) known_mechanisms = SOURCES.keys.sort.map do |key| key.inspect end.join(', ') super("#{mechanism.inspect} is invalid, please use one of the following mechanisms: #{known_mechanisms}") end |