class Mongo::Auth::InvalidMechanism
Raised when trying to get an invalid authorization mechanism.
@since 2.0.0
Public Class Methods
new(mechanism)
click to toggle source
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
# File lib/mongo/auth.rb, line 91 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