Skip to content

Commit d11997f

Browse files
committed
Explicitly ignore some linter errors
- rename `exception` local var to `e`
1 parent 2230054 commit d11997f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/bosh_common/lib/common/retryable.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ def retryer(&blk)
3131
raise Bosh::Common::RetryCountExceeded if @try_count >= @retry_limit
3232
wait
3333
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
3737
raise if @try_count >= @retry_limit
3838

39-
@retry_exception = exception
39+
@retry_exception = e
4040
wait
4141
retry
4242
ensure
@@ -64,10 +64,10 @@ def default_options
6464

6565
def wait
6666
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) }
6969
# 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
7171
end
7272

7373
def exponential_sleeper

src/bosh_common/lib/common/thread_pool.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def create_thread
7575

7676
begin
7777
action.call
78-
rescue Exception => e
78+
rescue Exception => e # rubocop:disable Lint/RescueException
7979
raise_worker_exception(e)
8080
end
8181
end

0 commit comments

Comments
 (0)