Exception: Smith::PersistenceIOError
- 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
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
Instance Method Summary collapse
-
#initialize(operation:, cause:) ⇒ PersistenceIOError
constructor
A new instance of PersistenceIOError.
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.}") end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
95 96 97 |
# File 'lib/smith/errors.rb', line 95 def cause @cause end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
95 96 97 |
# File 'lib/smith/errors.rb', line 95 def operation @operation end |