class Mongoid::Errors::CreateCollectionFailure
Raised when an attempt to create a collection failed.
Public Class Methods
new(collection_name, collection_options, error)
click to toggle source
Instantiate the create collection error.
@param [ String ] collection_name The name of the collection that
Mongoid failed to create.
@param [ Hash ] collection_options The options that were used when
tried to create the collection.
@param [ Mongo::Error::OperationFailure ] error The error raised when
tried to create the collection.
@api private
Calls superclass method
# File lib/mongoid/errors/create_collection_failure.rb, line 20 def initialize(collection_name, collection_options, error) super( compose_message( "create_collection_failure", { collection_name: collection_name, collection_options: collection_options, error: "#{error.class}: #{error.message}" } ) ) end