Sha256: bca2844d932be1f48da1213272affda807d04ca31e36454d7bdbed124c9a0cb1

Contents?: true

Size: 583 Bytes

Versions: 24

Compression:

Stored size: 583 Bytes

Contents

# frozen_string_literal: true

module Mongoid
  module Errors

    # Raised when attempting to destroy a document that had destroy callbacks
    # return false.
    class DocumentNotDestroyed < MongoidError

      # Instantiate the exception.
      #
      # @example Create the error.
      #   DocumentNotDestroyed.new(Band)
      #
      # @param [ Object ] id The document id.
      # @param [ Class ] klass The document class.
      def initialize(id, klass)
        super(compose_message("document_not_destroyed", { id: id.inspect, klass: klass }))
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
mongoid-8.1.7 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.1.6 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.0.8 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.1.5 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.1.4 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.0.7 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.1.3 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.1.2 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.0.6 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.5.4 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.1.1 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.0.5 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.1.0 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.5.3 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.0.4 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.0.3 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.5.2 lib/mongoid/errors/document_not_destroyed.rb
mongoid-8.0.2 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.5.1 lib/mongoid/errors/document_not_destroyed.rb
mongoid-7.4.3 lib/mongoid/errors/document_not_destroyed.rb