Exception: CouchDB::InvalidValue
- Inherits:
-
PropertyError
- Object
- RuntimeError
- Error
- PropertyError
- CouchDB::InvalidValue
- Defined in:
- lib/couchdb/errors.rb
Instance Attribute Summary collapse
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from PropertyError
Instance Method Summary collapse
-
#initialize(name, value, reason = nil) ⇒ InvalidValue
constructor
A new instance of InvalidValue.
- #to_hash ⇒ Object
Constructor Details
#initialize(name, value, reason = nil) ⇒ InvalidValue
Returns a new instance of InvalidValue.
43 44 45 46 |
# File 'lib/couchdb/errors.rb', line 43 def initialize(name, value, reason = nil) @value, @reason = value, reason super name, "#{value.inspect} is not a valid value for #{name} (#{reason})." end |
Instance Attribute Details
#reason ⇒ Object
Returns the value of attribute reason.
41 42 43 |
# File 'lib/couchdb/errors.rb', line 41 def reason @reason end |
#value ⇒ Object
Returns the value of attribute value.
41 42 43 |
# File 'lib/couchdb/errors.rb', line 41 def value @value end |
Instance Method Details
#to_hash ⇒ Object
48 49 50 |
# File 'lib/couchdb/errors.rb', line 48 def to_hash {:property => name, :value => value, :error => 'invalid'} end |