Exception: ResilientCall::RetriesExhaustedError
- Inherits:
-
StandardError
- Object
- StandardError
- ResilientCall::RetriesExhaustedError
- Defined in:
- lib/resilient_call/errors.rb
Overview
Raised when all configured retries have been exhausted without success. The original exception is available through Ruby’s native ‘#cause` chain when this error is raised from inside a rescue block.
Instance Attribute Summary collapse
-
#attempts ⇒ Object
readonly
Returns the value of attribute attempts.
Instance Method Summary collapse
-
#initialize(attempts:, message: nil) ⇒ RetriesExhaustedError
constructor
A new instance of RetriesExhaustedError.
Constructor Details
#initialize(attempts:, message: nil) ⇒ RetriesExhaustedError
Returns a new instance of RetriesExhaustedError.
23 24 25 26 |
# File 'lib/resilient_call/errors.rb', line 23 def initialize(attempts:, message: nil) @attempts = attempts super( || "exhausted after #{attempts} attempt(s)") end |
Instance Attribute Details
#attempts ⇒ Object (readonly)
Returns the value of attribute attempts.
21 22 23 |
# File 'lib/resilient_call/errors.rb', line 21 def attempts @attempts end |