Exception: Mongoid::Errors::DropCollectionFailure

Inherits:
MongoidError
  • Object
show all
Defined in:
lib/mongoid/errors/drop_collection_failure.rb

Overview

Raised when an attempt to drop a collection failed.

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Attribute Summary

Attributes inherited from MongoidError

#problem, #resolution, #summary

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(collection_name, _collection_options, _error) ⇒ DropCollectionFailure

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Instantiate the drop collection error.

Parameters:

  • collection_name (String)

    The name of the collection that Mongoid failed to drop.



13
14
15
16
17
18
19
20
21
22
# File 'lib/mongoid/errors/drop_collection_failure.rb', line 13

def initialize(collection_name, _collection_options, _error)
  super(
    compose_message(
      'drop_collection_failure',
      {
        collection_name: collection_name
      }
    )
  )
end