Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
throw browser error code
Browse files Browse the repository at this point in the history
  • Loading branch information
cnishina committed Dec 18, 2018
1 parent e658d6d commit 53a7612
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 37 deletions.
6 changes: 4 additions & 2 deletions lib/driverProviders/driverProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import {Builder, WebDriver} from 'selenium-webdriver';

import {BlockingProxyRunner} from '../bpRunner';
import {Config} from '../config';
import {BrowserError} from '../exitCodes';
import {Logger} from '../logger';

let logger = new Logger('driverProvider');
export abstract class DriverProvider {
drivers_: WebDriver[];
config_: Config;
Expand Down Expand Up @@ -60,8 +63,7 @@ export abstract class DriverProvider {
try {
newDriver = await builder.build();
} catch (e) {
e.code = 135;
throw e;
throw new BrowserError(logger, (e as Error).message);
}
this.drivers_.push(newDriver);
return newDriver;
Expand Down
56 changes: 21 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 53a7612

Please sign in to comment.