Skip to content

Commit

Permalink
[js] update ways error messages are handled for selenium manager
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Dec 1, 2022
1 parent c23b95b commit 7a79429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions javascript/node/selenium-webdriver/common/seleniumManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ function driverLocation(browser) {
result = execSync(args.join(' ')).toString()
} catch (e) {
throw new Error(
`Error executing command with ${args} : Error ${e.stderr.toString()}`
`Error executing command with ${args}\n${e.stdout.toString()}${e.stderr.toString()}`
)
}

if (!result.startsWith('INFO\t')) {
throw new Error(`Unsuccessful command executed ${args}}`)
throw new Error(`Unsuccessful command executed: ${args}\n${result}`)
}

return result.replace('INFO\t', '').trim()
Expand Down

0 comments on commit 7a79429

Please sign in to comment.