Exception: Mongoid::Errors::InvalidTime

Inherits:
MongoidError
  • Object
show all
Defined in:
build/mongoid-master/lib/mongoid/errors/invalid_time.rb

Overview

This exception is raised when a bad value is attempted to be converted to a date or time.

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Attribute Summary

Attributes inherited from MongoidError

#problem, #resolution, #summary

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(value) ⇒ InvalidTime

Create the new invalid date error.

Examples:

Create the new invalid date error.

InvalidTime.new("this is not a time")

Parameters:

  • value (Object)

    The value that was attempted.

Since:

  • 2.3.1



19
20
21
# File 'build/mongoid-master/lib/mongoid/errors/invalid_time.rb', line 19

def initialize(value)
  super(compose_message("invalid_time", { value: value }))
end