Sha256: eb0b5f33bcdd337360e091306353edb666f6bad20ae57ae02c5060e8a7bf02a8

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

# Copyright (C) 2014-2015 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module Mongo
  class Error

    # Exception raised for bulk operations that are empty.
    #
    # @since 2.0.0
    class EmptyBatch < Error

      # The error message.
      #
      # @since 2.0.0
      MESSAGE = 'No operations to execute'.freeze

      # Instantiate the new exception.
      #
      # @example Instantiate the exception.
      #   Mongo::Error::EmptyBatch.new
      #
      # @since 2.0.0
      def initialize
        super(MESSAGE)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongo-2.0.0.beta lib/mongo/error/empty_batch.rb