Exception: Familia::RecordExistsError
- Inherits:
-
NonUniqueKey
- Object
- RuntimeError
- Problem
- NonUniqueKey
- Familia::RecordExistsError
- Defined in:
- lib/familia/errors.rb
Overview
Raised when attempting to create an object that already exists in the database
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key) ⇒ RecordExistsError
constructor
A new instance of RecordExistsError.
- #message ⇒ Object
Constructor Details
#initialize(key) ⇒ RecordExistsError
Returns a new instance of RecordExistsError.
66 67 68 69 |
# File 'lib/familia/errors.rb', line 66 def initialize(key) @key = key super end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
64 65 66 |
# File 'lib/familia/errors.rb', line 64 def key @key end |
Instance Method Details
#message ⇒ Object
71 72 73 |
# File 'lib/familia/errors.rb', line 71 def "Key already exists: #{key}" end |