Skip to content

Commit

Permalink
Remove redundant rescue cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jemelyah committed Jan 30, 2024
1 parent 29e29f3 commit 02547d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ferrum/client/web_socket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def send_message(data)

def write(data)
@sock.write(data)
rescue EOFError, Errno::ECONNRESET, Errno::EPIPE, Errno::EBADF, IOError # rubocop:disable Lint/ShadowedException
rescue EOFError, Errno::ECONNRESET, Errno::EPIPE, IOError # rubocop:disable Lint/ShadowedException
@messages.close
end

Expand All @@ -96,7 +96,7 @@ def start

@driver.parse(data)
end
rescue EOFError, Errno::ECONNRESET, Errno::EPIPE, Errno::EBADF, IOError # rubocop:disable Lint/ShadowedException
rescue EOFError, Errno::ECONNRESET, Errno::EPIPE, IOError # rubocop:disable Lint/ShadowedException
@messages.close
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@

config.after(:all) do
@browser.quit
rescue IOError
raise unless Ferrum::Utils::Platform.jruby?
# rescue IOError
# raise unless Ferrum::Utils::Platform.jruby?
end

config.before(:each) do
Expand Down

0 comments on commit 02547d9

Please sign in to comment.