Skip to content

Commit a8f4184

Browse files
committed
[rb] make sure command execution errors get rescued
1 parent 769cd05 commit a8f4184

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rb/lib/selenium/webdriver/common/selenium_manager.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ def binary
7373
def run(command)
7474
WebDriver.logger.debug("Executing Process #{command}")
7575

76-
stdout, stderr, status = Open3.capture3(command)
76+
begin
77+
stdout, stderr, status = Open3.capture3(command)
78+
rescue StandardError => e
79+
raise Error::WebDriverError, "Unsuccessful command executed: #{command}", e
80+
end
81+
7782
if status.exitstatus.positive?
7883
raise Error::WebDriverError, "Unsuccessful command executed: #{command}\n#{stdout}#{stderr}"
7984
end

0 commit comments

Comments
 (0)