Skip to content

Commit 7d457b3

Browse files
remove rescue Exception.
1 parent bdb018d commit 7d457b3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Style/SignalException:
4646
Enabled: false
4747

4848
Lint/RescueException:
49-
Enabled: false
49+
Enabled: true
5050

5151
Layout/EndOfLine:
5252
EnforcedStyle: lf

lib/optimizely/event/batch_event_processor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def process(user_event)
9090

9191
begin
9292
@event_queue.push(user_event, true)
93-
rescue Exception
94-
@logger.log(Logger::WARN, 'Payload not accepted by the queue.')
93+
rescue => e
94+
@logger.log(Logger::WARN, 'Payload not accepted by the queue. ' + e.message)
9595
return
9696
end
9797
end

spec/event/batch_event_processor_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
@event_processor.process(conversion_event)
6464
# flush interval is set to 100ms. Wait for 300ms and assert that event is dispatched.
65-
sleep 1
65+
sleep 100
6666

6767
expect(@event_dispatcher).to have_received(:dispatch_event).with(log_event).once
6868
expect(@notification_center).to have_received(:send_notifications).with(

0 commit comments

Comments
 (0)