class Mongo::Auth::InvalidMechanism
Raised when trying to get an invalid authorization mechanism.
@since 2.0.0
Public Class Methods
Source
# File lib/mongo/auth.rb, line 115 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
Instantiate the new error.
@example Instantiate the error.
Mongo::Auth::InvalidMechanism.new(:test)
@param [ Symbol
] mechanism The provided mechanism.
@since 2.0.0
Calls superclass method