Skip to content

Commit 67bdb18

Browse files
committed
improve messages
1 parent 290362c commit 67bdb18

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,15 @@ def parse_result_and_log(stdout)
107107

108108
def validate_command_result(command, status, result, stderr)
109109
if status.nil? || status.exitstatus.nil?
110-
WebDriver.logger.info("Invalid process exit status for: #{command}. Assuming success if result is present.",
110+
WebDriver.logger.info("No exit status for: #{command}. Assuming success if result is present.",
111111
id: :selenium_manager)
112112
end
113113

114114
return unless status&.exitstatus&.positive? || result.nil?
115115

116+
code = status&.exitstatus || 'exit status not available'
116117
raise Error::WebDriverError,
117-
"Unsuccessful command executed: #{command} - Code #{status&.exitstatus}\n#{result}\n#{stderr}"
118+
"Unsuccessful command executed: #{command} - Code #{code}\n#{result}\n#{stderr}"
118119
end
119120
end
120121
end # SeleniumManager

0 commit comments

Comments
 (0)