Exception: Textus::CursorExpired

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

Instance Attribute Summary collapse

Attributes inherited from Error

#code, #details, #exit_code, #hint

Instance Method Summary collapse

Methods inherited from Error

#to_envelope

Constructor Details

#initialize(requested:, min_available:) ⇒ CursorExpired

Returns a new instance of CursorExpired.



219
220
221
222
223
224
225
226
227
228
229
# File 'lib/textus/errors.rb', line 219

def initialize(requested:, min_available:)
  @requested = requested
  @min_available = min_available
  super(
    "cursor_expired",
    "audit cursor expired: requested seq=#{requested} but oldest available is #{min_available}; " \
    "call `textus boot` to re-orient and resume from latest_seq",
    details: { "requested" => requested, "min_available" => min_available },
    hint: "call `textus boot` to get the current latest_seq and resume from there",
  )
end

Instance Attribute Details

#min_availableObject (readonly)

Returns the value of attribute min_available.



217
218
219
# File 'lib/textus/errors.rb', line 217

def min_available
  @min_available
end

#requestedObject (readonly)

Returns the value of attribute requested.



217
218
219
# File 'lib/textus/errors.rb', line 217

def requested
  @requested
end