Exception: Humanoid::Errors::DocumentNotFound
- Defined in:
- lib/humanoid/errors.rb
Overview
Raised when querying the database for a document by a specific id which does not exist. If multiple ids were passed then it will display all of those.
Example:
DocumentNotFound.new(Person, ["1", "2"])
Instance Method Summary collapse
-
#initialize(klass, ids) ⇒ DocumentNotFound
constructor
A new instance of DocumentNotFound.
- #message ⇒ Object
Constructor Details
#initialize(klass, ids) ⇒ DocumentNotFound
Returns a new instance of DocumentNotFound.
13 14 15 |
# File 'lib/humanoid/errors.rb', line 13 def initialize(klass, ids) @klass, @identifier = klass, ids.is_a?(Array) ? ids.join(", ") : ids end |
Instance Method Details
#message ⇒ Object
16 17 18 |
# File 'lib/humanoid/errors.rb', line 16 def "Document not found for class #{@klass} and id(s) #{@identifier}" end |