Skip to content

Commit

Permalink
chore: Replace occurrences of the deprecated errorAndThrow API (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Dec 12, 2024
1 parent a40692b commit 010ef76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/chromedriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ export class Chromedriver extends events.EventEmitter {

if (this.disableBuildCheck) {
if (_.isEmpty(cds)) {
this.log.errorAndThrow(
throw this.log.errorWithException(
`There must be at least one Chromedriver executable available for use if ` +
`'chromedriverDisableBuildCheck' capability is set to 'true'`,
);
Expand All @@ -425,7 +425,7 @@ export class Chromedriver extends events.EventEmitter {
if (!chromeVersion) {
// unable to get the chrome version
if (_.isEmpty(cds)) {
this.log.errorAndThrow(
throw this.log.errorWithException(
`There must be at least one Chromedriver executable available for use if ` +
`the current Chrome version cannot be determined`,
);
Expand Down Expand Up @@ -716,7 +716,7 @@ export class Chromedriver extends events.EventEmitter {
}

message += err.message;
this.log.errorAndThrow(message);
throw this.log.errorWithException(message);
}
}

Expand Down

0 comments on commit 010ef76

Please sign in to comment.