Method: BGS::Exceptions::BGSErrors#with_multiple_attempts_enabled
- Defined in:
- lib/bgs/exceptions/bgs_errors.rb
#with_multiple_attempts_enabled ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/bgs/exceptions/bgs_errors.rb', line 10 def with_multiple_attempts_enabled attempt ||= 0 yield rescue => e attempt += 1 if attempt < MAX_ATTEMPTS notify_of_service_exception(e, __method__.to_s, attempt, :warn) retry end notify_of_service_exception(e, __method__.to_s) end |