Exception: DataMapper::Property::InvalidValueError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dm-core/property/invalid_value_error.rb

Overview

Exception raised when DataMapper is about to work with invalid property values.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (InvalidValueError) initialize(property, value)

A new instance of InvalidValueError



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/dm-core/property/invalid_value_error.rb', line 8

def initialize(property, value)
  msg = "Invalid value %s for property %s (%s) on model %s" %
    [ value.inspect,
      property.name.inspect,
      property.class.name,
      property.model.name
    ]
  super(msg)
  @property = property
  @value = value
end

Instance Attribute Details

- (Object) property (readonly)

Returns the value of attribute property



6
7
8
# File 'lib/dm-core/property/invalid_value_error.rb', line 6

def property
  @property
end

- (Object) value (readonly)

Returns the value of attribute value



6
7
8
# File 'lib/dm-core/property/invalid_value_error.rb', line 6

def value
  @value
end