Sha256: 6d648a3e8d9425f0dd41079eb474b7f005451420f1e010c7a29e92638d21616f

Contents?: true

Size: 545 Bytes

Versions: 25

Compression:

Stored size: 545 Bytes

Contents

# frozen_string_literal: true

module Mongoid
  module Errors

    # This exception is raised when a bad value is attempted to be converted to
    # a date or time.
    class InvalidTime < MongoidError

      # Create the new invalid date error.
      #
      # @example Create the new invalid date error.
      #   InvalidTime.new("this is not a time")
      #
      # @param [ Object ] value The value that was attempted.
      def initialize(value)
        super(compose_message("invalid_time", { value: value }))
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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