Exception: Leann::CorruptedIndexError

Inherits:
Error
  • Object
show all
Defined in:
lib/leann/errors.rb

Overview

Raised when index is corrupted or invalid

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index_name, reason = nil) ⇒ CorruptedIndexError

Returns a new instance of CorruptedIndexError.



56
57
58
59
60
61
62
# File 'lib/leann/errors.rb', line 56

def initialize(index_name, reason = nil)
  @index_name = index_name
  @reason = reason
  message = "Corrupted index: #{index_name}"
  message += " (#{reason})" if reason
  super(message)
end

Instance Attribute Details

#index_nameObject (readonly)

Returns the value of attribute index_name.



54
55
56
# File 'lib/leann/errors.rb', line 54

def index_name
  @index_name
end

#reasonObject (readonly)

Returns the value of attribute reason.



54
55
56
# File 'lib/leann/errors.rb', line 54

def reason
  @reason
end