Exception: Mongo::Auth::InvalidMechanism

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/mongo/auth.rb

Overview

Raised when trying to get an invalid authorization mechanism.

Since:

  • 2.0.0

Instance Method Summary collapse

Constructor Details

#initialize(mechanism) ⇒ InvalidMechanism

Instantiate the new error.

Examples:

Instantiate the error.

Mongo::Auth::InvalidMechanism.new(:test)

Parameters:

  • mechanism (Symbol)

    The provided mechanism.

Since:

  • 2.0.0



84
85
86
# File 'lib/mongo/auth.rb', line 84

def initialize(mechanism)
  super("#{mechanism.inspect} is invalid, please use mongodb_cr, mongodb_x509, gssapi or plain.")
end