Exception: Smith::PersistenceIOError

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

Overview

Raised after persistence retry attempts are exhausted. Wraps the underlying I/O cause (Redis connection error, AR connection error, cache backend error) so hosts can distinguish a true I/O failure from a programmatic error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation:, cause:) ⇒ PersistenceIOError

Returns a new instance of PersistenceIOError.



97
98
99
100
101
# File 'lib/smith/errors.rb', line 97

def initialize(operation:, cause:)
  @operation = operation
  @cause = cause
  super("persistence I/O error during #{operation}: #{cause.class}: #{cause.message}")
end

Instance Attribute Details

#causeObject (readonly)

Returns the value of attribute cause.



95
96
97
# File 'lib/smith/errors.rb', line 95

def cause
  @cause
end

#operationObject (readonly)

Returns the value of attribute operation.



95
96
97
# File 'lib/smith/errors.rb', line 95

def operation
  @operation
end