Commit d11997f 1 parent 2230054 commit d11997f Copy full SHA for d11997f
File tree 2 files changed +8
-8
lines changed
src/bosh_common/lib/common
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ def retryer(&blk)
31
31
raise Bosh ::Common ::RetryCountExceeded if @try_count >= @retry_limit
32
32
wait
33
33
end
34
- rescue Exception => exception
35
- raise unless @matchers . any? { |m | m . matches? ( exception ) }
36
- raise unless exception . message =~ @matching
34
+ rescue Exception => e # rubocop:disable Lint/RescueException
35
+ raise unless @matchers . any? { |m | m . matches? ( e ) }
36
+ raise unless e . message =~ @matching
37
37
raise if @try_count >= @retry_limit
38
38
39
- @retry_exception = exception
39
+ @retry_exception = e
40
40
wait
41
41
retry
42
42
ensure
@@ -64,10 +64,10 @@ def default_options
64
64
65
65
def wait
66
66
sleep ( @sleeper . respond_to? ( :call ) ? @sleeper . call ( @try_count , @retry_exception ) : @sleeper )
67
- rescue Exception => exception
68
- raise unless @matchers . any? { |m | m . matches? ( exception ) }
67
+ rescue Exception => e # rubocop:disable Lint/RescueException
68
+ raise unless @matchers . any? { |m | m . matches? ( e ) }
69
69
# SignalException could be raised while sleeping, so if you want to catch it,
70
- # it need to be passed in the list of exceptions to ignore
70
+ # it needs to be passed in the list of exceptions to ignore
71
71
end
72
72
73
73
def exponential_sleeper
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def create_thread
75
75
76
76
begin
77
77
action . call
78
- rescue Exception => e
78
+ rescue Exception => e # rubocop:disable Lint/RescueException
79
79
raise_worker_exception ( e )
80
80
end
81
81
end
You can’t perform that action at this time.
0 commit comments