Skip to content

Commit 010ef76

Browse files
chore: Replace occurrences of the deprecated errorAndThrow API (#449)
1 parent a40692b commit 010ef76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/chromedriver.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ export class Chromedriver extends events.EventEmitter {
406406

407407
if (this.disableBuildCheck) {
408408
if (_.isEmpty(cds)) {
409-
this.log.errorAndThrow(
409+
throw this.log.errorWithException(
410410
`There must be at least one Chromedriver executable available for use if ` +
411411
`'chromedriverDisableBuildCheck' capability is set to 'true'`,
412412
);
@@ -425,7 +425,7 @@ export class Chromedriver extends events.EventEmitter {
425425
if (!chromeVersion) {
426426
// unable to get the chrome version
427427
if (_.isEmpty(cds)) {
428-
this.log.errorAndThrow(
428+
throw this.log.errorWithException(
429429
`There must be at least one Chromedriver executable available for use if ` +
430430
`the current Chrome version cannot be determined`,
431431
);
@@ -716,7 +716,7 @@ export class Chromedriver extends events.EventEmitter {
716716
}
717717

718718
message += err.message;
719-
this.log.errorAndThrow(message);
719+
throw this.log.errorWithException(message);
720720
}
721721
}
722722

0 commit comments

Comments
 (0)