Sha256: 53a22458137f21ec0784addeafcc3986d3cdb5410822de65d26a4e22655e1ab5

Contents?: true

Size: 1.18 KB

Versions: 4

Compression:

Stored size: 1.18 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

    # Raised if the URI is in the correct format but an option is provided that
    # is not recognized.
    #
    # @since 2.0.0
    class InvalidURIOption < Error

      # Create the error.
      #
      # @example Create the error with the invalid option name.
      #   InvalidURIOption.new('nothing')
      #
      # @param [ String ] name The invalid option name.
      #
      # @since 2.0.0
      def initialize(name)
        super("Invalid option in URI: '#{name}'.\n" +
          "Please see the following URL for more information: #{Mongo::URI::HELP}\n")
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongo-2.0.6 lib/mongo/error/invalid_uri_option.rb
mongo-2.0.5 lib/mongo/error/invalid_uri_option.rb
mongo-2.0.4 lib/mongo/error/invalid_uri_option.rb
mongo-2.0.3 lib/mongo/error/invalid_uri_option.rb