Exception: Samvera::NestingIndexer::Exceptions::DocumentIsItsOwnAncestorError
- Inherits:
-
CycleDetectionError
- Object
- RuntimeError
- RuntimeError
- CycleDetectionError
- Samvera::NestingIndexer::Exceptions::DocumentIsItsOwnAncestorError
- Defined in:
- lib/samvera/nesting_indexer/exceptions.rb
Overview
Raised when we encounter a document that is to be indexed as its own ancestor.
Instance Attribute Summary collapse
-
#pathnames ⇒ Object
readonly
Returns the value of attribute pathnames.
Attributes inherited from CycleDetectionError
Instance Method Summary collapse
-
#initialize(id:, pathnames:) ⇒ DocumentIsItsOwnAncestorError
constructor
A new instance of DocumentIsItsOwnAncestorError.
- #to_s ⇒ Object
Constructor Details
#initialize(id:, pathnames:) ⇒ DocumentIsItsOwnAncestorError
Returns a new instance of DocumentIsItsOwnAncestorError.
54 55 56 57 |
# File 'lib/samvera/nesting_indexer/exceptions.rb', line 54 def initialize(id:, pathnames:) super(id: id) @pathnames = pathnames end |
Instance Attribute Details
#pathnames ⇒ Object (readonly)
Returns the value of attribute pathnames.
53 54 55 |
# File 'lib/samvera/nesting_indexer/exceptions.rb', line 53 def pathnames @pathnames end |
Instance Method Details
#to_s ⇒ Object
59 60 61 |
# File 'lib/samvera/nesting_indexer/exceptions.rb', line 59 def to_s "Document with ID=#{id.inspect} is marked as its own ancestor based on the given pathnames: #{pathnames.inspect}." end |